Completed
Push — master ( ea245d...db8b7d )
by Dominik
01:43
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/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/MissingRepositoryException.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   +7 added lines, -7 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
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $this->resolveModels();
55 55
 
56
-        $this->models[$model->getId()] = $model;
56
+        $this->models[ $model->getId() ] = $model;
57 57
 
58 58
         return $this;
59 59
     }
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     {
67 67
         $this->resolveModels();
68 68
 
69
-        if (isset($this->models[$model->getId()])) {
70
-            unset($this->models[$model->getId()]);
69
+        if (isset($this->models[ $model->getId() ])) {
70
+            unset($this->models[ $model->getId() ]);
71 71
         }
72 72
 
73 73
         return $this;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $this->resolveModels();
83 83
 
84
-        $this->models = [];
84
+        $this->models = [ ];
85 85
         foreach ($models as $model) {
86 86
             $this->addModel($model);
87 87
         }
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
     {
117 117
         $this->resolveModels();
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/ModelCollection.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
 
@@ -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
         $this->setModels($models);
27 27
         $this->initialModels = $this->models;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function addModel(ModelInterface $model): ModelCollectionInterface
35 35
     {
36
-        $this->models[$model->getId()] = $model;
36
+        $this->models[ $model->getId() ] = $model;
37 37
 
38 38
         return $this;
39 39
     }
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function removeModel(ModelInterface $model): ModelCollectionInterface
46 46
     {
47
-        if (isset($this->models[$model->getId()])) {
48
-            unset($this->models[$model->getId()]);
47
+        if (isset($this->models[ $model->getId() ])) {
48
+            unset($this->models[ $model->getId() ]);
49 49
         }
50 50
 
51 51
         return $this;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function setModels(array $models): ModelCollectionInterface
59 59
     {
60
-        $this->models = [];
60
+        $this->models = [ ];
61 61
         foreach ($models as $model) {
62 62
             $this->addModel($model);
63 63
         }
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function jsonSerialize(): array
88 88
     {
89
-        $serializedModels = [];
89
+        $serializedModels = [ ];
90 90
         foreach ($this->models as $model) {
91
-            $serializedModels[] = $model->jsonSerialize();
91
+            $serializedModels[ ] = $model->jsonSerialize();
92 92
         }
93 93
 
94 94
         return $serializedModels;
Please login to merge, or discard this patch.
src/Cache/EntryCache.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\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): EntryCacheInterface
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): EntryCacheInterface
59 59
     {
60
-        unset($this->cache[$id]);
60
+        unset($this->cache[ $id ]);
61 61
 
62 62
         return $this;
63 63
     }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function clear(): EntryCacheInterface
69 69
     {
70
-        $this->cache = [];
70
+        $this->cache = [ ];
71 71
 
72 72
         return $this;
73 73
     }
Please login to merge, or discard this patch.