Completed
Push — master ( 1e9d1d...0b81fa )
by Dominik
01:53
created
src/ModelInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Chubbyphp\Model;
6 6
 
Please login to merge, or discard this patch.
src/Cache/ModelCacheInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Chubbyphp\Model;
6 6
 
Please login to merge, or discard this patch.
src/RepositoryInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Chubbyphp\Model;
6 6
 
Please login to merge, or discard this patch.
src/Collection/ModelCollectionInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Chubbyphp\Model;
6 6
 
Please login to merge, or discard this patch.
src/ResolverInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Chubbyphp\Model;
6 6
 
Please login to merge, or discard this patch.
src/Cache/EntryNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Chubbyphp\Model;
6 6
 
Please login to merge, or discard this patch.
src/Cache/ModelCache.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Chubbyphp\Model\Cache;
6 6
 
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * @var array
11 11
      */
12
-    private $cache = [];
12
+    private $cache = [ ];
13 13
 
14 14
     /**
15 15
      * @param string $id
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function set(string $id, array $entry): ModelCacheInterface
21 21
     {
22
-        $this->cache[$id] = $entry;
22
+        $this->cache[ $id ] = $entry;
23 23
 
24 24
         return $this;
25 25
     }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             throw EntryNotFoundException::fromId($id);
48 48
         }
49 49
 
50
-        return $this->cache[$id];
50
+        return $this->cache[ $id ];
51 51
     }
52 52
 
53 53
     /**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function remove(string $id): ModelCacheInterface
59 59
     {
60
-        unset($this->cache[$id]);
60
+        unset($this->cache[ $id ]);
61 61
 
62 62
         return $this;
63 63
     }
Please login to merge, or discard this patch.
src/Collection/ModelCollection.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Chubbyphp\Model\Collection;
6 6
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * @param ModelInterface[]|array $models
23 23
      */
24
-    public function __construct(array $models = [])
24
+    public function __construct(array $models = [ ])
25 25
     {
26 26
         $models = $this->modelsWithIdKey($models);
27 27
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     private function modelsWithIdKey(array $models): array
38 38
     {
39
-        $modelsWithIdKey = [];
39
+        $modelsWithIdKey = [ ];
40 40
         foreach ($models as $model) {
41 41
             if (!$model instanceof ModelInterface) {
42 42
                 throw new \InvalidArgumentException(
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                 );
45 45
             }
46 46
 
47
-            $modelsWithIdKey[$model->getId()] = $model;
47
+            $modelsWithIdKey[ $model->getId() ] = $model;
48 48
         }
49 49
 
50 50
         return $modelsWithIdKey;
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function jsonSerialize(): array
118 118
     {
119
-        $serializedModels = [];
119
+        $serializedModels = [ ];
120 120
         foreach ($this->models as $model) {
121
-            $serializedModels[] = $model->jsonSerialize();
121
+            $serializedModels[ ] = $model->jsonSerialize();
122 122
         }
123 123
 
124 124
         return $serializedModels;
Please login to merge, or discard this patch.
src/Collection/LazyModelCollection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Chubbyphp\Model\Collection;
6 6
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     private function modelsWithIdKey(array $models): array
54 54
     {
55
-        $modelsWithIdKey = [];
55
+        $modelsWithIdKey = [ ];
56 56
         foreach ($models as $model) {
57 57
             if (!$model instanceof ModelInterface) {
58 58
                 throw new \InvalidArgumentException(
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                 );
61 61
             }
62 62
 
63
-            $modelsWithIdKey[$model->getId()] = $model;
63
+            $modelsWithIdKey[ $model->getId() ] = $model;
64 64
         }
65 65
 
66 66
         return $modelsWithIdKey;
@@ -150,9 +150,9 @@  discard block
 block discarded – undo
150 150
     {
151 151
         $this->loadModels();
152 152
 
153
-        $serializedModels = [];
153
+        $serializedModels = [ ];
154 154
         foreach ($this->models as $model) {
155
-            $serializedModels[] = $model->jsonSerialize();
155
+            $serializedModels[ ] = $model->jsonSerialize();
156 156
         }
157 157
 
158 158
         return $serializedModels;
Please login to merge, or discard this patch.