@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Chubbyphp\Model\StorageCache; |
| 6 | 6 | |
@@ -9,12 +9,12 @@ discard block |
||
| 9 | 9 | /** |
| 10 | 10 | * @var array |
| 11 | 11 | */ |
| 12 | - private $cache = []; |
|
| 12 | + private $cache = [ ]; |
|
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * @param array $cache |
| 16 | 16 | */ |
| 17 | - public function __construct(array $cache = []) |
|
| 17 | + public function __construct(array $cache = [ ]) |
|
| 18 | 18 | { |
| 19 | 19 | $this->cache = $cache; |
| 20 | 20 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public function set(string $id, array $entry): StorageCacheInterface |
| 29 | 29 | { |
| 30 | - $this->cache[$id] = $entry; |
|
| 30 | + $this->cache[ $id ] = $entry; |
|
| 31 | 31 | |
| 32 | 32 | return $this; |
| 33 | 33 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | throw EntryNotFoundException::fromId($id); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - return $this->cache[$id]; |
|
| 58 | + return $this->cache[ $id ]; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public function remove(string $id): StorageCacheInterface |
| 67 | 67 | { |
| 68 | - unset($this->cache[$id]); |
|
| 68 | + unset($this->cache[ $id ]); |
|
| 69 | 69 | |
| 70 | 70 | return $this; |
| 71 | 71 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function clear(): StorageCacheInterface |
| 77 | 77 | { |
| 78 | - $this->cache = []; |
|
| 78 | + $this->cache = [ ]; |
|
| 79 | 79 | |
| 80 | 80 | return $this; |
| 81 | 81 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Chubbyphp\Model; |
| 6 | 6 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | if (substr($name, 0, 4) === 'lazy') { |
| 42 | 42 | $name = substr($name, 4); |
| 43 | 43 | |
| 44 | - return function () use ($modelClass, $name, $arguments) { |
|
| 44 | + return function() use ($modelClass, $name, $arguments) { |
|
| 45 | 45 | return $this->getRepositoryByClass($modelClass)->$name(...$arguments); |
| 46 | 46 | }; |
| 47 | 47 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function lazyFind(string $modelClass, string $id): \Closure |
| 101 | 101 | { |
| 102 | - return function () use ($modelClass, $id) { |
|
| 102 | + return function() use ($modelClass, $id) { |
|
| 103 | 103 | return $this->find($modelClass, $id); |
| 104 | 104 | }; |
| 105 | 105 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | public function lazyFindOneBy(string $modelClass, array $criteria, array $orderBy = null): \Closure |
| 115 | 115 | { |
| 116 | - return function () use ($modelClass, $criteria, $orderBy) { |
|
| 116 | + return function() use ($modelClass, $criteria, $orderBy) { |
|
| 117 | 117 | return $this->findOneBy($modelClass, $criteria, $orderBy); |
| 118 | 118 | }; |
| 119 | 119 | } |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | int $limit = null, |
| 135 | 135 | int $offset = null |
| 136 | 136 | ): \Closure { |
| 137 | - return function () use ($modelClass, $criteria, $orderBy, $limit, $offset) { |
|
| 137 | + return function() use ($modelClass, $criteria, $orderBy, $limit, $offset) { |
|
| 138 | 138 | return $this->findBy($modelClass, $criteria, $orderBy, $limit, $offset); |
| 139 | 139 | }; |
| 140 | 140 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Chubbyphp\Model; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Chubbyphp\Model; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Chubbyphp\Model; |
| 6 | 6 | |