@@ -48,7 +48,7 @@ |
||
| 48 | 48 | */ |
| 49 | 49 | public function columns() |
| 50 | 50 | { |
| 51 | - return array_map(function ($meta) { |
|
| 51 | + return array_map(function($meta) { |
|
| 52 | 52 | return $this->column($meta['field']); |
| 53 | 53 | }, $this->metadata->fields); |
| 54 | 54 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | { |
| 89 | 89 | return new IndexSet( |
| 90 | 90 | array_map( |
| 91 | - function ($index) { |
|
| 91 | + function($index) { |
|
| 92 | 92 | return new DoctrineIndex($index); |
| 93 | 93 | }, |
| 94 | 94 | $this->table->getIndexes() |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | { |
| 104 | 104 | return new ConstraintSet( |
| 105 | 105 | array_map( |
| 106 | - function ($fk) { |
|
| 106 | + function($fk) { |
|
| 107 | 107 | return new DoctrineForeignKey($fk); |
| 108 | 108 | }, |
| 109 | 109 | $this->table->getForeignKeys() |
@@ -185,7 +185,7 @@ |
||
| 185 | 185 | $constraintName, |
| 186 | 186 | isset($options['onDelete']) ? $options['onDelete'] : ForeignKey::MODE_RESTRICT, |
| 187 | 187 | isset($options['onUpdate']) ? $options['onUpdate'] : ForeignKey::MODE_RESTRICT, |
| 188 | - isset($options['match']) ? $options['match'] : ForeignKey::MATCH_SIMPLE |
|
| 188 | + isset($options['match']) ? $options['match'] : ForeignKey::MATCH_SIMPLE |
|
| 189 | 189 | ); |
| 190 | 190 | |
| 191 | 191 | $this->foreignKeys[$foreignKey->name()] = $foreignKey; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | public function diff($listDrop = true) |
| 71 | 71 | { |
| 72 | 72 | $queries = $this->schema() |
| 73 | - ->simulate(function (SchemaManagerInterface $schema) use ($listDrop) { |
|
| 73 | + ->simulate(function(SchemaManagerInterface $schema) use ($listDrop) { |
|
| 74 | 74 | $schema->useDrop($listDrop); |
| 75 | 75 | $schema->add($this->table()); |
| 76 | 76 | }) |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | $sequenceQueries = $schemaSequence |
| 84 | - ->simulate(function (SchemaManagerInterface $schema) use ($listDrop) { |
|
| 84 | + ->simulate(function(SchemaManagerInterface $schema) use ($listDrop) { |
|
| 85 | 85 | $schema->useDrop($listDrop); |
| 86 | 86 | $schema->add($this->sequence()); |
| 87 | 87 | }) |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | $connection = $this->connection($this->metadata->sequence['connection']); |
| 154 | - $table = $this->metadata->sequence['table']; |
|
| 154 | + $table = $this->metadata->sequence['table']; |
|
| 155 | 155 | |
| 156 | 156 | $nb = $connection->from($table)->count(); |
| 157 | 157 | |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | /** |
| 164 | 164 | * {@inheritdoc} |
| 165 | 165 | */ |
| 166 | - public function truncate($cascade =false) |
|
| 166 | + public function truncate($cascade = false) |
|
| 167 | 167 | { |
| 168 | 168 | return $this->schema()->truncate($this->metadata->table, $cascade); |
| 169 | 169 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $tables = [$tables]; |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | - $tables = array_map(function ($table) { |
|
| 90 | + $tables = array_map(function($table) { |
|
| 91 | 91 | if ($table instanceof TableInterface) { |
| 92 | 92 | return (new TableTransformer($table, $this->platform))->toDoctrine(); |
| 93 | 93 | } |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | $queries = $queries->toSql($this->platform->grammar()); |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | - foreach ((array)$queries as $query) { |
|
| 238 | + foreach ((array) $queries as $query) { |
|
| 239 | 239 | $this->queries[] = $query; |
| 240 | 240 | } |
| 241 | 241 | |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | return $this->get($type)->toDatabase($value); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - throw new TypeException(gettype($value), 'Cannot convert to database the value : ' . print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
| 157 | + throw new TypeException(gettype($value), 'Cannot convert to database the value : '.print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | /** |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | return null; |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | - throw new TypeException(gettype($value), 'Cannot convert to php the value : ' . print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
| 179 | + throw new TypeException(gettype($value), 'Cannot convert to php the value : '.print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | /** |
@@ -327,7 +327,7 @@ |
||
| 327 | 327 | return $items->all(); |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | - return (array)$items; |
|
| 330 | + return (array) $items; |
|
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | /** |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function resolve($entityClass) |
| 27 | 27 | { |
| 28 | - return $entityClass . $this->suffix; |
|
| 28 | + return $entityClass.$this->suffix; |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | public function setReadOnly($flag) |
| 224 | 224 | { |
| 225 | - $this->readOnly = (bool)$flag; |
|
| 225 | + $this->readOnly = (bool) $flag; |
|
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | /** |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | */ |
| 261 | 261 | public function setQuoteIdentifier($flag) |
| 262 | 262 | { |
| 263 | - $this->useQuoteIdentifier = (bool)$flag; |
|
| 263 | + $this->useQuoteIdentifier = (bool) $flag; |
|
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | /** |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | public function setGenerator($generator) |
| 282 | 282 | { |
| 283 | 283 | if (!is_string($generator) && !$generator instanceof GeneratorInterface) { |
| 284 | - throw new LogicException('Trying to set an invalid generator in "' . get_class($this) . '"'); |
|
| 284 | + throw new LogicException('Trying to set an invalid generator in "'.get_class($this).'"'); |
|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | $this->generator = $generator; |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | $relations = $this->relations(); |
| 516 | 516 | |
| 517 | 517 | if (!isset($relations[$relationName])) { |
| 518 | - throw new RelationNotFoundException('Relation "' . $relationName . '" is not set in ' . $this->metadata->entityName); |
|
| 518 | + throw new RelationNotFoundException('Relation "'.$relationName.'" is not set in '.$this->metadata->entityName); |
|
| 519 | 519 | } |
| 520 | 520 | |
| 521 | 521 | return $relations[$relationName]; |
@@ -689,7 +689,7 @@ discard block |
||
| 689 | 689 | */ |
| 690 | 690 | public function scopes() |
| 691 | 691 | { |
| 692 | - throw new LogicException('No scopes have been defined in "' . get_class($this) . '"'); |
|
| 692 | + throw new LogicException('No scopes have been defined in "'.get_class($this).'"'); |
|
| 693 | 693 | } |
| 694 | 694 | |
| 695 | 695 | /** |