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
a8019c65
Commit
a8019c65
authored
Mar 24, 2012
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CS: Apply unused local variable changes by @hhamon - Fixes GH-91
parent
8c9e9e81
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
19 additions
and
31 deletions
+19
-31
Connection.php
lib/Doctrine/DBAL/Connection.php
+1
-1
DB2Platform.php
lib/Doctrine/DBAL/Platforms/DB2Platform.php
+2
-2
MySqlPlatform.php
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
+1
-1
OraclePlatform.php
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
+1
-5
SQLServerPlatform.php
lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
+1
-2
AbstractSchemaManager.php
lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
+9
-9
Comparator.php
lib/Doctrine/DBAL/Schema/Comparator.php
+1
-1
DB2SchemaManager.php
lib/Doctrine/DBAL/Schema/DB2SchemaManager.php
+0
-1
MySqlSchemaManager.php
lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
+2
-8
OracleSchemaManager.php
lib/Doctrine/DBAL/Schema/OracleSchemaManager.php
+1
-1
No files found.
lib/Doctrine/DBAL/Connection.php
View file @
a8019c65
...
...
@@ -1164,7 +1164,7 @@ class Connection implements DriverConnection
// Positional parameters
$typeOffset
=
array_key_exists
(
0
,
$types
)
?
-
1
:
0
;
$bindIndex
=
1
;
foreach
(
$params
as
$
position
=>
$
value
)
{
foreach
(
$params
as
$value
)
{
$typeIndex
=
$bindIndex
+
$typeOffset
;
if
(
isset
(
$types
[
$typeIndex
]))
{
$type
=
$types
[
$typeIndex
];
...
...
lib/Doctrine/DBAL/Platforms/DB2Platform.php
View file @
a8019c65
...
...
@@ -358,7 +358,7 @@ class DB2Platform extends AbstractPlatform
$sqls
=
parent
::
_getCreateTableSQL
(
$tableName
,
$columns
,
$options
);
foreach
(
$indexes
as
$
index
=>
$
definition
)
{
foreach
(
$indexes
as
$definition
)
{
$sqls
[]
=
$this
->
getCreateIndexSQL
(
$definition
,
$tableName
);
}
return
$sqls
;
...
...
@@ -376,7 +376,7 @@ class DB2Platform extends AbstractPlatform
$columnSql
=
array
();
$queryParts
=
array
();
foreach
(
$diff
->
addedColumns
as
$
fieldName
=>
$
column
)
{
foreach
(
$diff
->
addedColumns
as
$column
)
{
if
(
$this
->
onSchemaAlterTableAddColumn
(
$column
,
$diff
,
$columnSql
))
{
continue
;
}
...
...
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
View file @
a8019c65
...
...
@@ -460,7 +460,7 @@ class MySqlPlatform extends AbstractPlatform
$queryParts
[]
=
'RENAME TO '
.
$diff
->
newName
;
}
foreach
(
$diff
->
addedColumns
as
$
fieldName
=>
$
column
)
{
foreach
(
$diff
->
addedColumns
as
$column
)
{
if
(
$this
->
onSchemaAlterTableAddColumn
(
$column
,
$diff
,
$columnSql
))
{
continue
;
}
...
...
lib/Doctrine/DBAL/Platforms/OraclePlatform.php
View file @
a8019c65
...
...
@@ -354,7 +354,7 @@ class OraclePlatform extends AbstractPlatform
}
if
(
isset
(
$indexes
)
&&
!
empty
(
$indexes
))
{
foreach
(
$indexes
as
$index
Name
=>
$index
)
{
foreach
(
$indexes
as
$index
)
{
$sql
[]
=
$this
->
getCreateIndexSQL
(
$index
,
$table
);
}
}
...
...
@@ -408,10 +408,6 @@ class OraclePlatform extends AbstractPlatform
$sql
=
array
();
$indexName
=
$table
.
'_AI_PK'
;
$definition
=
array
(
'primary'
=>
true
,
'columns'
=>
array
(
$name
=>
true
),
);
$idx
=
new
\Doctrine\DBAL\Schema\Index
(
$indexName
,
array
(
$name
),
true
,
true
);
...
...
lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
View file @
a8019c65
...
...
@@ -153,7 +153,6 @@ class SQLServerPlatform extends AbstractPlatform
public
function
getDropIndexSQL
(
$index
,
$table
=
null
)
{
if
(
$index
instanceof
\Doctrine\DBAL\Schema\Index
)
{
$index_
=
$index
;
$index
=
$index
->
getQuotedName
(
$this
);
}
else
if
(
!
is_string
(
$index
))
{
throw
new
\InvalidArgumentException
(
'AbstractPlatform::getDropIndexSQL() expects $index parameter to be string or \Doctrine\DBAL\Schema\Index.'
);
...
...
@@ -322,7 +321,7 @@ class SQLServerPlatform extends AbstractPlatform
$queryParts
[]
=
'RENAME TO '
.
$diff
->
newName
;
}
foreach
(
$diff
->
addedColumns
as
$
fieldName
=>
$
column
)
{
foreach
(
$diff
->
addedColumns
as
$column
)
{
if
(
$this
->
onSchemaAlterTableAddColumn
(
$column
,
$diff
,
$columnSql
))
{
continue
;
}
...
...
lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php
View file @
a8019c65
...
...
@@ -576,7 +576,7 @@ abstract class AbstractSchemaManager
protected
function
_getPortableDatabasesList
(
$databases
)
{
$list
=
array
();
foreach
(
$databases
as
$
key
=>
$
value
)
{
foreach
(
$databases
as
$value
)
{
if
(
$value
=
$this
->
_getPortableDatabaseDefinition
(
$value
))
{
$list
[]
=
$value
;
}
...
...
@@ -592,7 +592,7 @@ abstract class AbstractSchemaManager
protected
function
_getPortableFunctionsList
(
$functions
)
{
$list
=
array
();
foreach
(
$functions
as
$
key
=>
$
value
)
{
foreach
(
$functions
as
$value
)
{
if
(
$value
=
$this
->
_getPortableFunctionDefinition
(
$value
))
{
$list
[]
=
$value
;
}
...
...
@@ -608,7 +608,7 @@ abstract class AbstractSchemaManager
protected
function
_getPortableTriggersList
(
$triggers
)
{
$list
=
array
();
foreach
(
$triggers
as
$
key
=>
$
value
)
{
foreach
(
$triggers
as
$value
)
{
if
(
$value
=
$this
->
_getPortableTriggerDefinition
(
$value
))
{
$list
[]
=
$value
;
}
...
...
@@ -624,7 +624,7 @@ abstract class AbstractSchemaManager
protected
function
_getPortableSequencesList
(
$sequences
)
{
$list
=
array
();
foreach
(
$sequences
as
$
key
=>
$
value
)
{
foreach
(
$sequences
as
$value
)
{
if
(
$value
=
$this
->
_getPortableSequenceDefinition
(
$value
))
{
$list
[]
=
$value
;
}
...
...
@@ -656,7 +656,7 @@ abstract class AbstractSchemaManager
$eventManager
=
$this
->
_platform
->
getEventManager
();
$list
=
array
();
foreach
(
$tableColumns
as
$
key
=>
$
tableColumn
)
{
foreach
(
$tableColumns
as
$tableColumn
)
{
$column
=
null
;
$defaultPrevented
=
false
;
...
...
@@ -748,7 +748,7 @@ abstract class AbstractSchemaManager
protected
function
_getPortableTablesList
(
$tables
)
{
$list
=
array
();
foreach
(
$tables
as
$
key
=>
$
value
)
{
foreach
(
$tables
as
$value
)
{
if
(
$value
=
$this
->
_getPortableTableDefinition
(
$value
))
{
$list
[]
=
$value
;
}
...
...
@@ -764,7 +764,7 @@ abstract class AbstractSchemaManager
protected
function
_getPortableUsersList
(
$users
)
{
$list
=
array
();
foreach
(
$users
as
$
key
=>
$
value
)
{
foreach
(
$users
as
$value
)
{
if
(
$value
=
$this
->
_getPortableUserDefinition
(
$value
))
{
$list
[]
=
$value
;
}
...
...
@@ -780,7 +780,7 @@ abstract class AbstractSchemaManager
protected
function
_getPortableViewsList
(
$views
)
{
$list
=
array
();
foreach
(
$views
as
$
key
=>
$
value
)
{
foreach
(
$views
as
$value
)
{
if
(
$view
=
$this
->
_getPortableViewDefinition
(
$value
))
{
$viewName
=
strtolower
(
$view
->
getQuotedName
(
$this
->
_platform
));
$list
[
$viewName
]
=
$view
;
...
...
@@ -797,7 +797,7 @@ abstract class AbstractSchemaManager
protected
function
_getPortableTableForeignKeysList
(
$tableForeignKeys
)
{
$list
=
array
();
foreach
(
$tableForeignKeys
as
$
key
=>
$
value
)
{
foreach
(
$tableForeignKeys
as
$value
)
{
if
(
$value
=
$this
->
_getPortableTableForeignKeyDefinition
(
$value
))
{
$list
[]
=
$value
;
}
...
...
lib/Doctrine/DBAL/Schema/Comparator.php
View file @
a8019c65
...
...
@@ -261,7 +261,7 @@ class Comparator
}
}
foreach
(
$renameCandidates
as
$candidate
=>
$candidate
Columns
)
{
foreach
(
$renameCandidates
as
$candidateColumns
)
{
if
(
count
(
$candidateColumns
)
==
1
)
{
list
(
$removedColumn
,
$addedColumn
)
=
$candidateColumns
[
0
];
$removedColumnName
=
strtolower
(
$removedColumn
->
getName
());
...
...
lib/Doctrine/DBAL/Schema/DB2SchemaManager.php
View file @
a8019c65
...
...
@@ -124,7 +124,6 @@ class DB2SchemaManager extends AbstractSchemaManager
{
$eventManager
=
$this
->
_platform
->
getEventManager
();
$tableIndexRows
=
array
();
$indexes
=
array
();
foreach
(
$tableIndexes
as
$indexKey
=>
$data
)
{
$data
=
array_change_key_case
(
$data
,
\CASE_LOWER
);
...
...
lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
View file @
a8019c65
...
...
@@ -146,17 +146,11 @@ class MySqlSchemaManager extends AbstractSchemaManager
}
$length
=
((
int
)
$length
==
0
)
?
null
:
(
int
)
$length
;
$def
=
array
(
'type'
=>
$type
,
'length'
=>
$length
,
'unsigned'
=>
(
bool
)
$unsigned
,
'fixed'
=>
(
bool
)
$fixed
);
$options
=
array
(
'length'
=>
$length
,
'unsigned'
=>
(
bool
)
$unsigned
,
'fixed'
=>
(
bool
)
$fixed
,
'unsigned'
=>
(
bool
)
$unsigned
,
'fixed'
=>
(
bool
)
$fixed
,
'default'
=>
isset
(
$tableColumn
[
'default'
])
?
$tableColumn
[
'default'
]
:
null
,
'notnull'
=>
(
bool
)
(
$tableColumn
[
'null'
]
!=
'YES'
),
'scale'
=>
null
,
...
...
lib/Doctrine/DBAL/Schema/OracleSchemaManager.php
View file @
a8019c65
...
...
@@ -199,7 +199,7 @@ class OracleSchemaManager extends AbstractSchemaManager
protected
function
_getPortableTableForeignKeysList
(
$tableForeignKeys
)
{
$list
=
array
();
foreach
(
$tableForeignKeys
as
$
key
=>
$
value
)
{
foreach
(
$tableForeignKeys
as
$value
)
{
$value
=
\array_change_key_case
(
$value
,
CASE_LOWER
);
if
(
!
isset
(
$list
[
$value
[
'constraint_name'
]]))
{
if
(
$value
[
'delete_rule'
]
==
"NO ACTION"
)
{
...
...
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