diff options
Diffstat (limited to 'lib/private/DB')
-rw-r--r-- | lib/private/DB/Connection.php | 6 | ||||
-rw-r--r-- | lib/private/DB/MigrationService.php | 8 | ||||
-rw-r--r-- | lib/private/DB/OracleConnection.php | 2 | ||||
-rw-r--r-- | lib/private/DB/OracleMigrator.php | 36 | ||||
-rw-r--r-- | lib/private/DB/SchemaWrapper.php | 2 |
5 files changed, 27 insertions, 27 deletions
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php index ed00bcd0e04..bfca8d4ec7b 100644 --- a/lib/private/DB/Connection.php +++ b/lib/private/DB/Connection.php @@ -160,7 +160,7 @@ class Connection extends ReconnectWrapper implements IDBConnection { * @param int $offset * @return \Doctrine\DBAL\Driver\Statement The prepared statement. */ - public function prepare( $statement, $limit=null, $offset=null ) { + public function prepare($statement, $limit=null, $offset=null) { if ($limit === -1) { $limit = null; } @@ -289,7 +289,7 @@ class Connection extends ReconnectWrapper implements IDBConnection { $insertQb = $this->getQueryBuilder(); $insertQb->insert($table) ->values( - array_map(function($value) use ($insertQb) { + array_map(function ($value) use ($insertQb) { return $insertQb->createNamedParameter($value, $this->getType($value)); }, array_merge($keys, $values)) ); @@ -383,7 +383,7 @@ class Connection extends ReconnectWrapper implements IDBConnection { * @param string $table table name without the prefix * @return bool */ - public function tableExists($table){ + public function tableExists($table) { $table = $this->tablePrefix . trim($table); $schema = $this->getSchemaManager(); return $schema->tablesExist([$table]); diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index 9f5b5bfe72b..dd719ef0a5b 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -468,12 +468,12 @@ class MigrationService { $instance = $this->createInstance($version); if (!$schemaOnly) { - $instance->preSchemaChange($this->output, function() { + $instance->preSchemaChange($this->output, function () { return new SchemaWrapper($this->connection); }, ['tablePrefix' => $this->connection->getPrefix()]); } - $toSchema = $instance->changeSchema($this->output, function() { + $toSchema = $instance->changeSchema($this->output, function () { return new SchemaWrapper($this->connection); }, ['tablePrefix' => $this->connection->getPrefix()]); @@ -488,7 +488,7 @@ class MigrationService { } if (!$schemaOnly) { - $instance->postSchemaChange($this->output, function() { + $instance->postSchemaChange($this->output, function () { return new SchemaWrapper($this->connection); }, ['tablePrefix' => $this->connection->getPrefix()]); } @@ -538,7 +538,7 @@ class MigrationService { if ($isUsingDefaultName) { $sequenceName = $table->getName() . '_' . implode('_', $primaryKey->getColumns()) . '_seq'; - $sequences = array_filter($sequences, function(Sequence $sequence) use ($sequenceName) { + $sequences = array_filter($sequences, function (Sequence $sequence) use ($sequenceName) { return $sequence->getName() !== $sequenceName; }); } diff --git a/lib/private/DB/OracleConnection.php b/lib/private/DB/OracleConnection.php index cc1bf66d874..93a52d1772d 100644 --- a/lib/private/DB/OracleConnection.php +++ b/lib/private/DB/OracleConnection.php @@ -98,7 +98,7 @@ class OracleConnection extends Connection { * @param string $table table name without the prefix * @return bool */ - public function tableExists($table){ + public function tableExists($table) { $table = $this->tablePrefix . trim($table); $table = $this->quoteIdentifier($table); $schema = $this->getSchemaManager(); diff --git a/lib/private/DB/OracleMigrator.php b/lib/private/DB/OracleMigrator.php index 7695532a4b7..86d1f71c2b7 100644 --- a/lib/private/DB/OracleMigrator.php +++ b/lib/private/DB/OracleMigrator.php @@ -77,7 +77,7 @@ class OracleMigrator extends Migrator { return new Index( //TODO migrate existing uppercase indexes, then $this->connection->quoteIdentifier($index->getName()), $index->getName(), - array_map(function($columnName) { + array_map(function ($columnName) { return $this->connection->quoteIdentifier($columnName); }, $index->getColumns()), $index->isUnique(), @@ -96,11 +96,11 @@ class OracleMigrator extends Migrator { */ protected function quoteForeignKeyConstraint($fkc) { return new ForeignKeyConstraint( - array_map(function($columnName) { + array_map(function ($columnName) { return $this->connection->quoteIdentifier($columnName); }, $fkc->getLocalColumns()), $this->connection->quoteIdentifier($fkc->getForeignTableName()), - array_map(function($columnName) { + array_map(function ($columnName) { return $this->connection->quoteIdentifier($columnName); }, $fkc->getForeignColumns()), $fkc->getName(), @@ -118,16 +118,16 @@ class OracleMigrator extends Migrator { $schemaDiff = parent::getDiff($targetSchema, $connection); // oracle forces us to quote the identifiers - $schemaDiff->newTables = array_map(function(Table $table) { + $schemaDiff->newTables = array_map(function (Table $table) { return new Table( $this->connection->quoteIdentifier($table->getName()), - array_map(function(Column $column) { + array_map(function (Column $column) { return $this->quoteColumn($column); }, $table->getColumns()), - array_map(function(Index $index) { + array_map(function (Index $index) { return $this->quoteIndex($index); }, $table->getIndexes()), - array_map(function(ForeignKeyConstraint $fck) { + array_map(function (ForeignKeyConstraint $fck) { return $this->quoteForeignKeyConstraint($fck); }, $table->getForeignKeys()), 0, @@ -135,7 +135,7 @@ class OracleMigrator extends Migrator { ); }, $schemaDiff->newTables); - $schemaDiff->removedTables = array_map(function(Table $table) { + $schemaDiff->removedTables = array_map(function (Table $table) { return new Table( $this->connection->quoteIdentifier($table->getName()), $table->getColumns(), @@ -149,7 +149,7 @@ class OracleMigrator extends Migrator { foreach ($schemaDiff->changedTables as $tableDiff) { $tableDiff->name = $this->connection->quoteIdentifier($tableDiff->name); - $tableDiff->addedColumns = array_map(function(Column $column) { + $tableDiff->addedColumns = array_map(function (Column $column) { return $this->quoteColumn($column); }, $tableDiff->addedColumns); @@ -163,39 +163,39 @@ class OracleMigrator extends Migrator { return count($column->changedProperties) > 0; }); - $tableDiff->removedColumns = array_map(function(Column $column) { + $tableDiff->removedColumns = array_map(function (Column $column) { return $this->quoteColumn($column); }, $tableDiff->removedColumns); - $tableDiff->renamedColumns = array_map(function(Column $column) { + $tableDiff->renamedColumns = array_map(function (Column $column) { return $this->quoteColumn($column); }, $tableDiff->renamedColumns); - $tableDiff->addedIndexes = array_map(function(Index $index) { + $tableDiff->addedIndexes = array_map(function (Index $index) { return $this->quoteIndex($index); }, $tableDiff->addedIndexes); - $tableDiff->changedIndexes = array_map(function(Index $index) { + $tableDiff->changedIndexes = array_map(function (Index $index) { return $this->quoteIndex($index); }, $tableDiff->changedIndexes); - $tableDiff->removedIndexes = array_map(function(Index $index) { + $tableDiff->removedIndexes = array_map(function (Index $index) { return $this->quoteIndex($index); }, $tableDiff->removedIndexes); - $tableDiff->renamedIndexes = array_map(function(Index $index) { + $tableDiff->renamedIndexes = array_map(function (Index $index) { return $this->quoteIndex($index); }, $tableDiff->renamedIndexes); - $tableDiff->addedForeignKeys = array_map(function(ForeignKeyConstraint $fkc) { + $tableDiff->addedForeignKeys = array_map(function (ForeignKeyConstraint $fkc) { return $this->quoteForeignKeyConstraint($fkc); }, $tableDiff->addedForeignKeys); - $tableDiff->changedForeignKeys = array_map(function(ForeignKeyConstraint $fkc) { + $tableDiff->changedForeignKeys = array_map(function (ForeignKeyConstraint $fkc) { return $this->quoteForeignKeyConstraint($fkc); }, $tableDiff->changedForeignKeys); - $tableDiff->removedForeignKeys = array_map(function(ForeignKeyConstraint $fkc) { + $tableDiff->removedForeignKeys = array_map(function (ForeignKeyConstraint $fkc) { return $this->quoteForeignKeyConstraint($fkc); }, $tableDiff->removedForeignKeys); } diff --git a/lib/private/DB/SchemaWrapper.php b/lib/private/DB/SchemaWrapper.php index f7f204a564c..eb24cc6f7aa 100644 --- a/lib/private/DB/SchemaWrapper.php +++ b/lib/private/DB/SchemaWrapper.php @@ -64,7 +64,7 @@ class SchemaWrapper implements ISchemaWrapper { */ public function getTableNamesWithoutPrefix() { $tableNames = $this->schema->getTableNames(); - return array_map(function($tableName) { + return array_map(function ($tableName) { if (strpos($tableName, $this->connection->getPrefix()) === 0) { return substr($tableName, strlen($this->connection->getPrefix())); } |