@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | */ |
| 350 | 350 | public function load($id) |
| 351 | 351 | { |
| 352 | - $statement = $this->cache(__FUNCTION__, function () { |
|
| 352 | + $statement = $this->cache(__FUNCTION__, function() { |
|
| 353 | 353 | return $this->select()->where('id = ?')->prepare(); |
| 354 | 354 | }); |
| 355 | 355 | if ($id instanceof EntityInterface) { |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | */ |
| 377 | 377 | public function loadAll() |
| 378 | 378 | { |
| 379 | - return $this->select()->setFetcher(function (Statement $statement) { |
|
| 379 | + return $this->select()->setFetcher(function(Statement $statement) { |
|
| 380 | 380 | yield from $this->fetchEach($statement); |
| 381 | 381 | }); |
| 382 | 382 | } |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | */ |
| 436 | 436 | protected function saveInsert(EntityInterface $entity): void |
| 437 | 437 | { |
| 438 | - $statement = $this->cache(__FUNCTION__, function () { |
|
| 438 | + $statement = $this->cache(__FUNCTION__, function() { |
|
| 439 | 439 | $slots = $this->db->slots(array_keys($this->columns)); |
| 440 | 440 | unset($slots['id']); |
| 441 | 441 | $columns = implode(',', array_keys($slots)); |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | */ |
| 456 | 456 | protected function saveUpdate(EntityInterface $entity): void |
| 457 | 457 | { |
| 458 | - $statement = $this->cache(__FUNCTION__, function () { |
|
| 458 | + $statement = $this->cache(__FUNCTION__, function() { |
|
| 459 | 459 | $slots = $this->db->slotsEqual(array_keys($this->columns)); |
| 460 | 460 | unset($slots['id']); |
| 461 | 461 | $slots = implode(', ', $slots); |
@@ -36,19 +36,19 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | const SCALARS = [ |
| 38 | 38 | 'bool' => 'bool', |
| 39 | - 'boolean' => 'bool', // gettype() |
|
| 40 | - 'double' => 'float', // gettype() |
|
| 41 | - 'false' => 'bool', // @var |
|
| 39 | + 'boolean' => 'bool', // gettype() |
|
| 40 | + 'double' => 'float', // gettype() |
|
| 41 | + 'false' => 'bool', // @var |
|
| 42 | 42 | 'float' => 'float', |
| 43 | 43 | 'int' => 'int', |
| 44 | - 'integer' => 'int', // gettype() |
|
| 45 | - 'NULL' => 'string', // gettype() |
|
| 46 | - 'number' => 'string', // @var |
|
| 47 | - 'scalar' => 'string', // @var |
|
| 44 | + 'integer' => 'int', // gettype() |
|
| 45 | + 'NULL' => 'string', // gettype() |
|
| 46 | + 'number' => 'string', // @var |
|
| 47 | + 'scalar' => 'string', // @var |
|
| 48 | 48 | 'string' => 'string', |
| 49 | - 'String' => 'String', // @var |
|
| 50 | - 'STRING' => 'STRING', // @var |
|
| 51 | - 'true' => 'bool', // @var |
|
| 49 | + 'String' => 'String', // @var |
|
| 50 | + 'STRING' => 'STRING', // @var |
|
| 51 | + 'true' => 'bool', // @var |
|
| 52 | 52 | ]; |
| 53 | 53 | |
| 54 | 54 | /** |