Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
94f80b91
Commit
94f80b91
authored
Jun 13, 2013
by
Steve Müller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix CS
parent
6942a202
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
9 deletions
+14
-9
AbstractPlatform.php
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+1
-1
ForeignKeyConstraint.php
lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php
+8
-5
Index.php
lib/Doctrine/DBAL/Schema/Index.php
+5
-3
No files found.
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
94f80b91
...
...
@@ -1166,7 +1166,7 @@ abstract class AbstractPlatform
/* @var $index Index */
if
(
$index
->
isPrimary
())
{
$platform
=
$this
;
$options
[
'primary'
]
=
$index
->
getQuotedColumns
(
$this
);
$options
[
'primary'
]
=
$index
->
getQuotedColumns
(
$this
);
$options
[
'primary_index'
]
=
$index
;
}
else
{
$options
[
'indexes'
][
$index
->
getName
()]
=
$index
;
...
...
lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php
View file @
94f80b91
...
...
@@ -74,13 +74,16 @@ class ForeignKeyConstraint extends AbstractAsset implements Constraint
public
function
__construct
(
array
$localColumnNames
,
$foreignTableName
,
array
$foreignColumnNames
,
$name
=
null
,
array
$options
=
array
())
{
$this
->
_setName
(
$name
);
$
this
->
_localColumnNames
=
$localColumnNames
?
array_combine
(
$localColumnNames
,
array_map
(
function
(
$column
)
{
$
identifierConstructorCallback
=
function
(
$column
)
{
return
new
Identifier
(
$column
);
},
$localColumnNames
))
:
array
();
};
$this
->
_localColumnNames
=
$localColumnNames
?
array_combine
(
$localColumnNames
,
array_map
(
$identifierConstructorCallback
,
$localColumnNames
))
:
array
();
$this
->
_foreignTableName
=
new
Identifier
(
$foreignTableName
);
$this
->
_foreignColumnNames
=
$foreignColumnNames
?
array_combine
(
$foreignColumnNames
,
array_map
(
function
(
$column
)
{
return
new
Identifier
(
$column
);
},
$foreignColumnNames
))
:
array
();
$this
->
_foreignColumnNames
=
$foreignColumnNames
?
array_combine
(
$foreignColumnNames
,
array_map
(
$identifierConstructorCallback
,
$foreignColumnNames
))
:
array
();
$this
->
_options
=
$options
;
}
...
...
lib/Doctrine/DBAL/Schema/Index.php
View file @
94f80b91
...
...
@@ -158,14 +158,16 @@ class Index extends AbstractAsset implements Constraint
*/
public
function
spansColumns
(
array
$columnNames
)
{
$columns
=
$this
->
getColumns
();
$columns
=
$this
->
getColumns
();
$numberOfColumns
=
count
(
$columns
);
$sameColumns
=
true
;
$sameColumns
=
true
;
for
(
$i
=
0
;
$i
<
$numberOfColumns
;
$i
++
)
{
if
(
!
isset
(
$columnNames
[
$i
])
||
$this
->
trimQuotes
(
strtolower
(
$columns
[
$i
]))
!==
$this
->
trimQuotes
(
strtolower
(
$columnNames
[
$i
])))
{
if
(
!
isset
(
$columnNames
[
$i
])
||
$this
->
trimQuotes
(
strtolower
(
$columns
[
$i
]))
!==
$this
->
trimQuotes
(
strtolower
(
$columnNames
[
$i
])))
{
$sameColumns
=
false
;
}
}
return
$sameColumns
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment