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
1e2d36b2
Unverified
Commit
1e2d36b2
authored
May 30, 2019
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3573 from jwage/id-types
Add proper types to Doctrine\DBAL\Id namespace.
parents
77d3dfa3
d2555b56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
13 deletions
+4
-13
TableGenerator.php
lib/Doctrine/DBAL/Id/TableGenerator.php
+3
-9
TableGeneratorSchemaVisitor.php
lib/Doctrine/DBAL/Id/TableGeneratorSchemaVisitor.php
+1
-4
No files found.
lib/Doctrine/DBAL/Id/TableGenerator.php
View file @
1e2d36b2
...
...
@@ -59,15 +59,13 @@ class TableGenerator
/** @var string */
private
$generatorTableName
;
/** @var
mixed[][]
*/
/** @var
array<string, array<string, int>>
*/
private
$sequences
=
[];
/**
* @param string $generatorTableName
*
* @throws DBALException
*/
public
function
__construct
(
Connection
$conn
,
$generatorTableName
=
'sequences'
)
public
function
__construct
(
Connection
$conn
,
string
$generatorTableName
=
'sequences'
)
{
$params
=
$conn
->
getParams
();
if
(
$params
[
'driver'
]
===
'pdo_sqlite'
)
{
...
...
@@ -80,13 +78,9 @@ class TableGenerator
/**
* Generates the next unused value for the given sequence name.
*
* @param string $sequenceName
*
* @return int
*
* @throws DBALException
*/
public
function
nextValue
(
$sequenceName
)
public
function
nextValue
(
string
$sequenceName
)
:
int
{
if
(
isset
(
$this
->
sequences
[
$sequenceName
]))
{
$value
=
$this
->
sequences
[
$sequenceName
][
'value'
];
...
...
lib/Doctrine/DBAL/Id/TableGeneratorSchemaVisitor.php
View file @
1e2d36b2
...
...
@@ -17,10 +17,7 @@ class TableGeneratorSchemaVisitor implements Visitor
/** @var string */
private
$generatorTableName
;
/**
* @param string $generatorTableName
*/
public
function
__construct
(
$generatorTableName
=
'sequences'
)
public
function
__construct
(
string
$generatorTableName
=
'sequences'
)
{
$this
->
generatorTableName
=
$generatorTableName
;
}
...
...
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