@@ -59,7 +59,7 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | public function getColumnsForTable($tableIdentifier) |
| 61 | 61 | { |
| 62 | - return array_filter($this->columnInfoList, function (ColumnInfo $columnInfo) use ($tableIdentifier) { |
|
| 62 | + return array_filter($this->columnInfoList, function(ColumnInfo $columnInfo) use ($tableIdentifier) { |
|
| 63 | 63 | return ($columnInfo->getTableInfo()->getIdentifier() === $tableIdentifier); |
| 64 | 64 | }); |
| 65 | 65 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | parent::__construct($connection); |
| 25 | 25 | if ($entityFactory) { |
| 26 | - $this->setupResult('setRowFactory', function (array $data) use ($entityFactory, $entityMapping) { |
|
| 26 | + $this->setupResult('setRowFactory', function(array $data) use ($entityFactory, $entityMapping) { |
|
| 27 | 27 | return $entityFactory->createEntity($entityMapping->getEntityClassName(), $data); |
| 28 | 28 | }); |
| 29 | 29 | } |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | private function addPKToFluent(IEntity $entity, $tableName, $columns, \DibiFluent $fluent) |
| 246 | 246 | { |
| 247 | 247 | /** @var ColumnInfo[] $pkColumns */ |
| 248 | - $pkColumns = array_filter($columns, function (ColumnInfo $columnInfo) { |
|
| 248 | + $pkColumns = array_filter($columns, function(ColumnInfo $columnInfo) { |
|
| 249 | 249 | return $columnInfo->isPrimaryKey(); |
| 250 | 250 | }); |
| 251 | 251 | if (!count($pkColumns)) { |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | protected function getEntityPropertyValue(IEntity $entity, ColumnInfo $property) |
| 317 | 317 | { |
| 318 | 318 | $propName = $property->getPropertyName(); |
| 319 | - $getterPk = \Closure::bind(function () use ($propName) { |
|
| 319 | + $getterPk = \Closure::bind(function() use ($propName) { |
|
| 320 | 320 | return $this->{$propName}; |
| 321 | 321 | }, $entity, get_class($entity)); |
| 322 | 322 | |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | { |
| 333 | 333 | $columnInfoListToUpdate = array_filter( |
| 334 | 334 | $columnInfos, |
| 335 | - function (ColumnInfo $columnInfo) use ($changedProperties) { |
|
| 335 | + function(ColumnInfo $columnInfo) use ($changedProperties) { |
|
| 336 | 336 | // never update a PK |
| 337 | 337 | if ($columnInfo->isPrimaryKey()) { |
| 338 | 338 | return false; |
@@ -365,13 +365,13 @@ discard block |
||
| 365 | 365 | $tableInfos = $mapping->getTables(); |
| 366 | 366 | if (!is_null($tables)) { |
| 367 | 367 | // grab TableInfo of given $tables |
| 368 | - $tableInfos = array_map(function ($tableName) use ($tableInfos, $entity) { |
|
| 369 | - if (!isset($tableInfos[ $tableName ])) { |
|
| 368 | + $tableInfos = array_map(function($tableName) use ($tableInfos, $entity) { |
|
| 369 | + if (!isset($tableInfos[$tableName])) { |
|
| 370 | 370 | throw new UnableToSaveException(sprintf('Unable to save entity: `%s`, unknown table `%s`', |
| 371 | 371 | get_class($entity), $tableName)); |
| 372 | 372 | } |
| 373 | 373 | |
| 374 | - return $tableInfos[ $tableName ]; |
|
| 374 | + return $tableInfos[$tableName]; |
|
| 375 | 375 | }, $tables); |
| 376 | 376 | } |
| 377 | 377 | |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | /** @var ColumnInfo[] $columnInfos */ |
| 389 | 389 | $columnInfos = []; |
| 390 | 390 | foreach ($mapping->getColumnsForTable($tableInfo->getIdentifier()) as $columnInfo) { |
| 391 | - $columnInfos[ $columnInfo->getPropertyName() ] = $columnInfo; |
|
| 391 | + $columnInfos[$columnInfo->getPropertyName()] = $columnInfo; |
|
| 392 | 392 | } |
| 393 | 393 | |
| 394 | 394 | return $columnInfos; |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | // ... then we can find DB mapping for those properties |
| 414 | 414 | $changedColumnInfos = array_filter( |
| 415 | 415 | $columnInfos, |
| 416 | - function (ColumnInfo $columnInfo) use ($changedProperties) { |
|
| 416 | + function(ColumnInfo $columnInfo) use ($changedProperties) { |
|
| 417 | 417 | return in_array($columnInfo->getPropertyName(), $changedProperties); |
| 418 | 418 | } |
| 419 | 419 | ); |