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
2b3b7182
Unverified
Commit
2b3b7182
authored
Apr 03, 2020
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Foreach overwrites $variable with its value variable.
parent
e17fcab8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
18 deletions
+12
-18
SqlitePlatform.php
src/Platforms/SqlitePlatform.php
+2
-2
CompositeExpression.php
src/Query/Expression/CompositeExpression.php
+1
-5
SchemaManagerFunctionalTestCase.php
tests/Functional/Schema/SchemaManagerFunctionalTestCase.php
+9
-11
No files found.
src/Platforms/SqlitePlatform.php
View file @
2b3b7182
...
@@ -325,8 +325,8 @@ class SqlitePlatform extends AbstractPlatform
...
@@ -325,8 +325,8 @@ class SqlitePlatform extends AbstractPlatform
$queryFields
=
$this
->
getColumnDeclarationListSQL
(
$columns
);
$queryFields
=
$this
->
getColumnDeclarationListSQL
(
$columns
);
if
(
isset
(
$options
[
'uniqueConstraints'
])
&&
!
empty
(
$options
[
'uniqueConstraints'
]))
{
if
(
isset
(
$options
[
'uniqueConstraints'
])
&&
!
empty
(
$options
[
'uniqueConstraints'
]))
{
foreach
(
$options
[
'uniqueConstraints'
]
as
$
n
ame
=>
$definition
)
{
foreach
(
$options
[
'uniqueConstraints'
]
as
$
constraintN
ame
=>
$definition
)
{
$queryFields
.=
', '
.
$this
->
getUniqueConstraintDeclarationSQL
(
$
n
ame
,
$definition
);
$queryFields
.=
', '
.
$this
->
getUniqueConstraintDeclarationSQL
(
$
constraintN
ame
,
$definition
);
}
}
}
}
...
...
src/Query/Expression/CompositeExpression.php
View file @
2b3b7182
...
@@ -119,11 +119,7 @@ class CompositeExpression implements Countable
...
@@ -119,11 +119,7 @@ class CompositeExpression implements Countable
{
{
$that
=
clone
$this
;
$that
=
clone
$this
;
$that
->
parts
[]
=
$part
;
$that
->
parts
=
array_merge
(
$that
->
parts
,
[
$part
],
$parts
);
foreach
(
$parts
as
$part
)
{
$that
->
parts
[]
=
$part
;
}
return
$that
;
return
$that
;
}
}
...
...
tests/Functional/Schema/SchemaManagerFunctionalTestCase.php
View file @
2b3b7182
...
@@ -171,26 +171,24 @@ abstract class SchemaManagerFunctionalTestCase extends FunctionalTestCase
...
@@ -171,26 +171,24 @@ abstract class SchemaManagerFunctionalTestCase extends FunctionalTestCase
);
);
}
}
$sequence
=
new
Sequence
(
'list_sequences_test_seq'
,
20
,
10
);
$this
->
schemaManager
->
createSequence
(
$this
->
schemaManager
->
createSequence
(
$sequence
);
new
Sequence
(
'list_sequences_test_seq'
,
20
,
10
)
);
$sequences
=
$this
->
schemaManager
->
listSequences
();
$sequences
=
$this
->
schemaManager
->
listSequences
();
self
::
assertIsArray
(
$sequences
,
'listSequences() should return an array.'
);
self
::
assertIsArray
(
$sequences
,
'listSequences() should return an array.'
);
$foundSequence
=
null
;
foreach
(
$sequences
as
$sequence
)
{
foreach
(
$sequences
as
$sequence
)
{
self
::
assertInstanceOf
(
Sequence
::
class
,
$sequence
,
'Array elements of listSequences() should be Sequence instances.'
);
if
(
strtolower
(
$sequence
->
getName
())
===
'list_sequences_test_seq'
)
{
if
(
strtolower
(
$sequence
->
getName
())
!==
'list_sequences_test_seq'
)
{
self
::
assertSame
(
20
,
$sequence
->
getAllocationSize
());
continue
;
self
::
assertSame
(
10
,
$sequence
->
getInitialValue
());
}
$foundSequence
=
$sequence
;
return
;
}
}
}
self
::
assertNotNull
(
$foundSequence
,
"Sequence with name 'list_sequences_test_seq' was not found."
);
self
::
fail
(
'Sequence was not found.'
);
self
::
assertSame
(
20
,
$foundSequence
->
getAllocationSize
(),
'Allocation Size is expected to be 20.'
);
self
::
assertSame
(
10
,
$foundSequence
->
getInitialValue
(),
'Initial Value is expected to be 10.'
);
}
}
public
function
testListDatabases
()
:
void
public
function
testListDatabases
()
:
void
...
...
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