Completed
Push — master ( cf9360...1d1204 )
by Dominik
02:06 queued 19s
created
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/Collection/LazyModelCollection.php 1 patch
Spacing   +8 added lines, -8 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;
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
     {
141 141
         $this->loadModels();
142 142
 
143
-        $toRemoveModels = [];
143
+        $toRemoveModels = [ ];
144 144
         foreach ($this->initialModels as $initialModel) {
145
-            if (!isset($this->models[$initialModel->getId()])) {
146
-                $toRemoveModels[$initialModel->getId()] = $initialModel;
145
+            if (!isset($this->models[ $initialModel->getId() ])) {
146
+                $toRemoveModels[ $initialModel->getId() ] = $initialModel;
147 147
             }
148 148
         }
149 149
 
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
     {
158 158
         $this->loadModels();
159 159
 
160
-        $serializedModels = [];
160
+        $serializedModels = [ ];
161 161
         foreach ($this->models as $model) {
162
-            $serializedModels[] = $model->jsonSerialize();
162
+            $serializedModels[ ] = $model->jsonSerialize();
163 163
         }
164 164
 
165 165
         return $serializedModels;
Please login to merge, or discard this patch.
src/Collection/ModelCollection.php 1 patch
Spacing   +9 added lines, -9 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;
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function toRemove(): array
110 110
     {
111
-        $toRemoveModels = [];
111
+        $toRemoveModels = [ ];
112 112
         foreach ($this->initialModels as $initialModel) {
113
-            if (!isset($this->models[$initialModel->getId()])) {
114
-                $toRemoveModels[$initialModel->getId()] = $initialModel;
113
+            if (!isset($this->models[ $initialModel->getId() ])) {
114
+                $toRemoveModels[ $initialModel->getId() ] = $initialModel;
115 115
             }
116 116
         }
117 117
 
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function jsonSerialize(): array
125 125
     {
126
-        $serializedModels = [];
126
+        $serializedModels = [ ];
127 127
         foreach ($this->models as $model) {
128
-            $serializedModels[] = $model->jsonSerialize();
128
+            $serializedModels[ ] = $model->jsonSerialize();
129 129
         }
130 130
 
131 131
         return $serializedModels;
Please login to merge, or discard this patch.
src/Resolver.php 1 patch
Spacing   +4 added lines, -4 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;
6 6
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public function find(RepositoryInterface $repository, string $id): \Closure
16 16
     {
17
-        return function () use ($repository, $id) {
17
+        return function() use ($repository, $id) {
18 18
             return $repository->find($id);
19 19
         };
20 20
     }
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function findOneBy(RepositoryInterface $repository, array $criteria): \Closure
29 29
     {
30
-        return function () use ($repository, $criteria) {
30
+        return function() use ($repository, $criteria) {
31 31
             return $repository->findOneBy($criteria);
32 32
         };
33 33
     }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         int $limit = null,
49 49
         int $offset = null
50 50
     ): \Closure {
51
-        return function () use ($repository, $criteria, $orderBy, $limit, $offset) {
51
+        return function() use ($repository, $criteria, $orderBy, $limit, $offset) {
52 52
             return $repository->findBy($criteria, $orderBy, $limit, $offset);
53 53
         };
54 54
     }
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.