@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | private function addPKToFluent(IEntity $entity, $tableName, $columns, \Dibi\Fluent $fluent) |
251 | 251 | { |
252 | 252 | /** @var ColumnInfo[] $pkColumns */ |
253 | - $pkColumns = array_filter($columns, function (ColumnInfo $columnInfo) { |
|
253 | + $pkColumns = array_filter($columns, function(ColumnInfo $columnInfo) { |
|
254 | 254 | return $columnInfo->isPrimaryKey(); |
255 | 255 | }); |
256 | 256 | if (!count($pkColumns)) { |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | protected function getEntityPropertyValue(IEntity $entity, ColumnInfo $property) |
322 | 322 | { |
323 | 323 | $propName = $property->getPropertyName(); |
324 | - $getterPk = \Closure::bind(function () use ($propName) { |
|
324 | + $getterPk = \Closure::bind(function() use ($propName) { |
|
325 | 325 | return $this->{$propName}; |
326 | 326 | }, $entity, get_class($entity)); |
327 | 327 | |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | { |
338 | 338 | $columnInfoListToUpdate = array_filter( |
339 | 339 | $columnInfos, |
340 | - function (ColumnInfo $columnInfo) use ($changedProperties) { |
|
340 | + function(ColumnInfo $columnInfo) use ($changedProperties) { |
|
341 | 341 | // never update a PK |
342 | 342 | if ($columnInfo->isPrimaryKey()) { |
343 | 343 | return false; |
@@ -370,13 +370,13 @@ discard block |
||
370 | 370 | $tableInfos = $mapping->getTables(); |
371 | 371 | if (!is_null($tables)) { |
372 | 372 | // grab TableInfo of given $tables |
373 | - $tableInfos = array_map(function ($tableName) use ($tableInfos, $entity) { |
|
374 | - if (!isset($tableInfos[ $tableName ])) { |
|
373 | + $tableInfos = array_map(function($tableName) use ($tableInfos, $entity) { |
|
374 | + if (!isset($tableInfos[$tableName])) { |
|
375 | 375 | throw new UnableToSaveException(sprintf('Unable to save entity: `%s`, unknown table `%s`', |
376 | 376 | get_class($entity), $tableName)); |
377 | 377 | } |
378 | 378 | |
379 | - return $tableInfos[ $tableName ]; |
|
379 | + return $tableInfos[$tableName]; |
|
380 | 380 | }, $tables); |
381 | 381 | } |
382 | 382 | |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | /** @var ColumnInfo[] $columnInfos */ |
394 | 394 | $columnInfos = []; |
395 | 395 | foreach ($mapping->getColumnsForTable($tableInfo->getIdentifier()) as $columnInfo) { |
396 | - $columnInfos[ $columnInfo->getPropertyName() ] = $columnInfo; |
|
396 | + $columnInfos[$columnInfo->getPropertyName()] = $columnInfo; |
|
397 | 397 | } |
398 | 398 | |
399 | 399 | return $columnInfos; |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | // ... then we can find DB mapping for those properties |
419 | 419 | $changedColumnInfos = array_filter( |
420 | 420 | $columnInfos, |
421 | - function (ColumnInfo $columnInfo) use ($changedProperties) { |
|
421 | + function(ColumnInfo $columnInfo) use ($changedProperties) { |
|
422 | 422 | return in_array($columnInfo->getPropertyName(), $changedProperties); |
423 | 423 | } |
424 | 424 | ); |