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
4e5e47e2
Unverified
Commit
4e5e47e2
authored
Sep 01, 2018
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bpo/2.8/3268' into 2.8
parents
a7dc38d8
334cc7d9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
Sequence.php
lib/Doctrine/DBAL/Schema/Sequence.php
+4
-4
ComparatorTest.php
tests/Doctrine/Tests/DBAL/Schema/ComparatorTest.php
+2
-0
No files found.
lib/Doctrine/DBAL/Schema/Sequence.php
View file @
4e5e47e2
...
...
@@ -57,8 +57,8 @@ class Sequence extends AbstractAsset
public
function
__construct
(
$name
,
$allocationSize
=
1
,
$initialValue
=
1
,
$cache
=
null
)
{
$this
->
_setName
(
$name
);
$this
->
allocationSize
=
is_numeric
(
$allocationSize
)
?
$allocationSize
:
1
;
$this
->
initialValue
=
is_numeric
(
$initialValue
)
?
$initialValue
:
1
;
$this
->
setAllocationSize
(
$allocationSize
)
;
$this
->
setInitialValue
(
$initialValue
)
;
$this
->
cache
=
$cache
;
}
...
...
@@ -93,7 +93,7 @@ class Sequence extends AbstractAsset
*/
public
function
setAllocationSize
(
$allocationSize
)
{
$this
->
allocationSize
=
is_numeric
(
$allocationSize
)
?
$allocationSize
:
1
;
$this
->
allocationSize
=
is_numeric
(
$allocationSize
)
?
(
int
)
$allocationSize
:
1
;
return
$this
;
}
...
...
@@ -105,7 +105,7 @@ class Sequence extends AbstractAsset
*/
public
function
setInitialValue
(
$initialValue
)
{
$this
->
initialValue
=
is_numeric
(
$initialValue
)
?
$initialValue
:
1
;
$this
->
initialValue
=
is_numeric
(
$initialValue
)
?
(
int
)
$initialValue
:
1
;
return
$this
;
}
...
...
tests/Doctrine/Tests/DBAL/Schema/ComparatorTest.php
View file @
4e5e47e2
...
...
@@ -435,11 +435,13 @@ class ComparatorTest extends \PHPUnit\Framework\TestCase
$seq1
=
new
Sequence
(
'foo'
,
1
,
1
);
$seq2
=
new
Sequence
(
'foo'
,
1
,
2
);
$seq3
=
new
Sequence
(
'foo'
,
2
,
1
);
$seq4
=
new
Sequence
(
'foo'
,
'1'
,
'1'
);
$c
=
new
Comparator
();
self
::
assertTrue
(
$c
->
diffSequence
(
$seq1
,
$seq2
));
self
::
assertTrue
(
$c
->
diffSequence
(
$seq1
,
$seq3
));
self
::
assertFalse
(
$c
->
diffSequence
(
$seq1
,
$seq4
));
}
public
function
testRemovedSequence
()
...
...
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