Passed
Push — master ( e78beb...1b1398 )
by Dominik
02:32
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/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/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/StorageCache/ArrayStorageCache.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\StorageCache;
6 6
 
@@ -9,12 +9,12 @@  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 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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
75 75
      */
76 76
     public function clear(): StorageCacheInterface
77 77
     {
78
-        $this->cache = [];
78
+        $this->cache = [ ];
79 79
 
80 80
         return $this;
81 81
     }
Please login to merge, or discard this patch.
src/ModelSortTrait.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;
6 6
 
@@ -14,25 +14,25 @@  discard block
 block discarded – undo
14 14
      */
15 15
     private function sort(string $modelClass, array $models, array $orderBy = null): array
16 16
     {
17
-        if ([] === $models) {
18
-            return [];
17
+        if ([ ] === $models) {
18
+            return [ ];
19 19
         }
20 20
 
21 21
         if (null === $orderBy) {
22 22
             return $models;
23 23
         }
24 24
 
25
-        $reflections = [];
25
+        $reflections = [ ];
26 26
         foreach ($orderBy as $property => $sortingDirection) {
27 27
             $reflection = new \ReflectionProperty($modelClass, $property);
28 28
             $reflection->setAccessible(true);
29 29
 
30
-            $reflections[$property] = $reflection;
30
+            $reflections[ $property ] = $reflection;
31 31
         }
32 32
 
33
-        usort($models, function (ModelInterface $a, ModelInterface $b) use ($reflections, $orderBy) {
33
+        usort($models, function(ModelInterface $a, ModelInterface $b) use ($reflections, $orderBy) {
34 34
             foreach ($orderBy as $property => $sortingDirection) {
35
-                $reflection = $reflections[$property];
35
+                $reflection = $reflections[ $property ];
36 36
                 $sorting = strcmp($reflection->getValue($a), $reflection->getValue($b));
37 37
                 if ($sortingDirection === 'DESC') {
38 38
                     $sorting = $sorting * -1;
Please login to merge, or discard this patch.
src/RelatedModelManipulationStack.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;
6 6
 
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * @var ModelInterface[]|array
11 11
      */
12
-    private $toPersistModels = [];
12
+    private $toPersistModels = [ ];
13 13
 
14 14
     /**
15 15
      * @var ModelInterface[]|array
16 16
      */
17
-    private $toRemoveModels = [];
17
+    private $toRemoveModels = [ ];
18 18
 
19 19
     /**
20 20
      * @param ModelInterface[]|array $models
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function addToPersistModel(ModelInterface $model): RelatedModelManipulationStack
37 37
     {
38
-        $this->toPersistModels[$model->getId()] = $model;
38
+        $this->toPersistModels[ $model->getId() ] = $model;
39 39
 
40 40
         return $this;
41 41
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function addToRemoveModel(ModelInterface $model): RelatedModelManipulationStack
61 61
     {
62
-        $this->toRemoveModels[$model->getId()] = $model;
62
+        $this->toRemoveModels[ $model->getId() ] = $model;
63 63
 
64 64
         return $this;
65 65
     }
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
     {
80 80
         $toRemoveModels = $this->toRemoveModels;
81 81
         foreach ($toRemoveModels as $toRemoveModel) {
82
-            if (isset($this->toPersistModels[$toRemoveModel->getId()])) {
83
-                unset($toRemoveModels[$toRemoveModel->getId()]);
82
+            if (isset($this->toPersistModels[ $toRemoveModel->getId() ])) {
83
+                unset($toRemoveModels[ $toRemoveModel->getId() ]);
84 84
             }
85 85
         }
86 86
 
Please login to merge, or discard this patch.
src/Resolver.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/Reference/LazyModelReference.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\Reference;
6 6
 
Please login to merge, or discard this patch.