Passed
Push — dev_2x ( 3e8772...896177 )
by Adrian
06:45
created
src/ConnectionLocator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     public static function new(...$args)
11 11
     {
12 12
         if ($args[0] instanceof Connection) {
13
-            return new ConnectionLocator(function () use ($args) {
13
+            return new ConnectionLocator(function() use ($args) {
14 14
                 return $args[0];
15 15
             });
16 16
         }
Please login to merge, or discard this patch.
src/Helpers/Arr.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             if (strpos($key, $separator)) {
27 27
                 $parents = static::getParents($key, $separator);
28 28
                 foreach ($parents as $parent) {
29
-                    if (! isset($arr[$parent])) {
29
+                    if (!isset($arr[$parent])) {
30 30
                         $arr[$parent] = null;
31 31
                     }
32 32
                 }
Please login to merge, or discard this patch.
src/Helpers/QueryHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 {
8 8
     public static function reference($table, $tableAlias)
9 9
     {
10
-        if (! $tableAlias || $table == $tableAlias) {
10
+        if (!$tableAlias || $table == $tableAlias) {
11 11
             return $table;
12 12
         }
13 13
 
Please login to merge, or discard this patch.
src/Relation/Aggregate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
 
89 89
     public function isLazyLoad()
90 90
     {
91
-        return ! isset($this->options[RelationConfig::LOAD_STRATEGY]) ||
91
+        return !isset($this->options[RelationConfig::LOAD_STRATEGY]) ||
92 92
                $this->options[RelationConfig::LOAD_STRATEGY] == RelationConfig::LOAD_LAZY;
93 93
     }
94 94
 
Please login to merge, or discard this patch.
src/Collection/Collection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     protected function ensureHydratedElement($element)
42 42
     {
43
-        if (! $this->hydrator) {
43
+        if (!$this->hydrator) {
44 44
             return $element;
45 45
         }
46 46
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     public function add($element)
79 79
     {
80 80
         $element = $this->ensureHydratedElement($element);
81
-        if (! $this->contains($element)) {
81
+        if (!$this->contains($element)) {
82 82
             $this->change('added', $element);
83 83
 
84 84
             return $this->collection->add($element);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     public function removeElement($element)
103 103
     {
104 104
         $element = $this->ensureHydratedElement($element);
105
-        if (! $this->contains($element)) {
105
+        if (!$this->contains($element)) {
106 106
             return true;
107 107
         }
108 108
         $removed = $this->collection->removeElement($this->findByPk($this->hydrator->getPk($element)));
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 
128 128
     public function pluck($names)
129 129
     {
130
-        return $this->map(function ($item) use ($names) {
131
-            if (! is_array($names)) {
130
+        return $this->map(function($item) use ($names) {
131
+            if (!is_array($names)) {
132 132
                 return $this->hydrator->get($item, $names);
133 133
             }
134 134
 
Please login to merge, or discard this patch.
src/CastingManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             return false;
71 71
         }
72 72
 
73
-        return ! ! $value;
73
+        return !!$value;
74 74
     }
75 75
 
76 76
     // phpcs:ignore
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
             return $value;
104 104
         }
105 105
 
106
-        return json_decode((string) $value, true);
106
+        return json_decode((string)$value, true);
107 107
     }
108 108
 
109 109
     public function json($value)
110 110
     {
111
-        if (! $value) {
111
+        if (!$value) {
112 112
             return new \ArrayObject();
113 113
         }
114 114
         if (is_array($value)) {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     // phpcs:ignore
127 127
     public function json_for_db($value)
128 128
     {
129
-        if (! $value) {
129
+        if (!$value) {
130 130
             return null;
131 131
         }
132 132
         if (is_array($value)) {
Please login to merge, or discard this patch.
src/Mapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
 
173 173
     public function getRelation(string $name): Relation
174 174
     {
175
-        if (! $this->hasRelation($name)) {
175
+        if (!$this->hasRelation($name)) {
176 176
             throw new \InvalidArgumentException("Relation named {$name} is not registered for this mapper");
177 177
         }
178 178
 
Please login to merge, or discard this patch.
src/Behaviour/Timestamps.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
             $mapper->getHydrator()->set($action->getEntity(), $this->updateColumn, $now);
46 46
         }
47 47
         if ($action instanceof Update && $this->updateColumn) {
48
-            if (! empty($action->getEntity()->getChanges())) {
48
+            if (!empty($action->getEntity()->getChanges())) {
49 49
                 $action->addColumns([$this->updateColumn => $now]);
50 50
                 $mapper->getHydrator()->set($action->getEntity(), $this->updateColumn, $now);
51 51
             }
Please login to merge, or discard this patch.
src/Entity/Tracker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $this->relations[$name]        = $relation;
65 65
         $this->relationCallback[$name] = $callback;
66
-        if (! empty($nextLoad)) {
66
+        if (!empty($nextLoad)) {
67 67
             $this->relationNextLoad[$name] = $nextLoad;
68 68
         }
69 69
     }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
     public function getResultsForRelation($name)
77 77
     {
78
-        if (! isset($this->relations[$name])) {
78
+        if (!isset($this->relations[$name])) {
79 79
             return [];
80 80
         }
81 81
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $result = [];
113 113
         foreach ($this->rows as $row) {
114 114
             $value = $this->getColumnsFromRow($row, $columns, $hydrator);
115
-            if ($value && ! in_array($value, $result)) {
115
+            if ($value && !in_array($value, $result)) {
116 116
                 $result[] = $value;
117 117
             }
118 118
         }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     public function getLazyAggregate(Aggregate $aggregate)
144 144
     {
145 145
         $name = $aggregate->getName();
146
-        if (! isset($this->lazyAggregates[$name])) {
146
+        if (!isset($this->lazyAggregates[$name])) {
147 147
             $this->lazyAggregates[$name] = new LazyAggregate($this, $aggregate);
148 148
         }
149 149
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     public function getLazyRelation(Relation $relation)
154 154
     {
155 155
         $name = $relation->getOption('name');
156
-        if (! isset($this->lazyRelations[$name])) {
156
+        if (!isset($this->lazyRelations[$name])) {
157 157
             $this->lazyRelations[$name] = new LazyRelation($this, $relation);
158 158
         }
159 159
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         }
190 190
 
191 191
         $queryNextLoad = $this->relationNextLoad[$name] ?? [];
192
-        if ($queryNextLoad && ! empty($queryNextLoad)) {
192
+        if ($queryNextLoad && !empty($queryNextLoad)) {
193 193
             foreach ($queryNextLoad as $next => $callback) {
194 194
                 $query = $query->load([$next => $callback]);
195 195
             }
Please login to merge, or discard this patch.