Passed
Push — master ( 33c6fc...b4603e )
by Adrian
01:36
created
src/Action/BaseAction.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,12 +98,12 @@  discard block
 block discarded – undo
98 98
 
99 99
     protected function addActionsForRelatedEntities()
100 100
     {
101
-        if ($this->getOption('relations') === false || ! $this->mapper) {
101
+        if ($this->getOption('relations') === false || !$this->mapper) {
102 102
             return;
103 103
         }
104 104
 
105 105
         foreach ($this->getMapper()->getRelations() as $name) {
106
-            if (! $this->mapper->hasRelation($name)) {
106
+            if (!$this->mapper->hasRelation($name)) {
107 107
                 continue;
108 108
             }
109 109
             $this->mapper->getRelation($name)->addActions($this);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         /** @var ActionInterface $action */
141 141
         foreach ($executed as $action) {
142 142
             // if called by another action, that action will call `onSuccess`
143
-            if (! $calledByAnotherAction || $action !== $this) {
143
+            if (!$calledByAnotherAction || $action !== $this) {
144 144
                 $action->onSuccess();
145 145
             }
146 146
         }
Please login to merge, or discard this patch.
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/Str.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     public static function underscore($str)
17 17
     {
18
-        if (! isset(static::$cache['underscore'][$str])) {
18
+        if (!isset(static::$cache['underscore'][$str])) {
19 19
             $str = strtolower($str);
20 20
             $str = preg_replace("/[^a-z0-9]+/", ' ', $str);
21 21
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     public static function methodName($str, $verb)
29 29
     {
30 30
         $key = $verb . $str;
31
-        if (! isset(static::$cache['methodName'][$key])) {
31
+        if (!isset(static::$cache['methodName'][$key])) {
32 32
             static::$cache['methodName'][$key] = strtolower($verb) . static::className($str);
33 33
         }
34 34
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     public static function variableName($str)
39 39
     {
40
-        if (! isset(static::$cache['variableName'][$str])) {
40
+        if (!isset(static::$cache['variableName'][$str])) {
41 41
             $class = static::className($str);
42 42
 
43 43
             static::$cache['variableName'][$str] = strtolower(substr($class, 0, 1)) . substr($class, 1);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public static function className($str)
50 50
     {
51
-        if (! isset(static::$cache['className'][$str])) {
51
+        if (!isset(static::$cache['className'][$str])) {
52 52
             $str = strtolower($str);
53 53
             $str = preg_replace("/[^a-z0-9]+/", ' ', $str);
54 54
             $str = ucwords($str);
Please login to merge, or discard this patch.
src/Collection/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
             /** @var ArrayCollection $changeCollection */
78 78
             $changeCollection = $this->changes[$t];
79 79
             if ($t == $type) {
80
-                if (! $changeCollection->contains($element)) {
80
+                if (!$changeCollection->contains($element)) {
81 81
                     $changeCollection->add($element);
82 82
                 }
83 83
             } else {
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
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             }
43 43
         }
44 44
         if ($action instanceof Update && $this->updateColumn) {
45
-            if (! empty($action->getEntity()->getChanges())) {
45
+            if (!empty($action->getEntity()->getChanges())) {
46 46
                 $action->addColumns([$this->updateColumn => time()]);
47 47
             }
48 48
         }
Please login to merge, or discard this patch.
src/QueryBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     public static function getInstance()
18 18
     {
19
-        if (! static::$instance) {
19
+        if (!static::$instance) {
20 20
             static::$instance = new static;
21 21
         }
22 22
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     protected function getQueryClass(Mapper $mapper)
34 34
     {
35 35
         $mapperClass = get_class($mapper);
36
-        if (! isset($this->queryClasses[$mapperClass])) {
36
+        if (!isset($this->queryClasses[$mapperClass])) {
37 37
             $queryClass = $mapperClass . 'Query';
38 38
             if (class_exists($queryClass)) {
39 39
                 $this->queryClasses[$mapperClass] = $queryClass;
Please login to merge, or discard this patch.
src/Relation/OneToMany.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
     protected function applyDefaults(): void
15 15
     {
16 16
         $nativeKey = $this->nativeMapper->getPrimaryKey();
17
-        if (! isset($this->options[RelationConfig::NATIVE_KEY])) {
17
+        if (!isset($this->options[RelationConfig::NATIVE_KEY])) {
18 18
             $this->options[RelationConfig::NATIVE_KEY] = $nativeKey;
19 19
         }
20 20
 
21
-        if (! isset($this->options[RelationConfig::FOREIGN_KEY])) {
21
+        if (!isset($this->options[RelationConfig::FOREIGN_KEY])) {
22 22
             $prefix                                     = Inflector::singularize($this->nativeMapper->getTable());
23 23
             $this->options[RelationConfig::FOREIGN_KEY] = $this->getKeyColumn($prefix, $nativeKey);
24 24
         }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function attachEntities(EntityInterface $nativeEntity, EntityInterface $foreignEntity)
70 70
     {
71 71
         foreach ($this->keyPairs as $nativeCol => $foreignCol) {
72
-            $nativeKeyValue  = $this->nativeMapper->getEntityAttribute($nativeEntity, $nativeCol);
72
+            $nativeKeyValue = $this->nativeMapper->getEntityAttribute($nativeEntity, $nativeCol);
73 73
             $this->foreignMapper->setEntityAttribute($foreignEntity, $foreignCol, $nativeKeyValue);
74 74
         }
75 75
     }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $remainingRelations = $this->getRemainingRelations($action->getOption('relations'));
92 92
 
93 93
         // no cascade delete? treat as save so we can process the changes
94
-        if (! $this->isCascade()) {
94
+        if (!$this->isCascade()) {
95 95
             $this->addActionOnSave($action);
96 96
         } else {
97 97
             // retrieve them again from the DB since the related collection might not have everything
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         // save the entities still in the collection
125 125
         foreach ($foreignEntities as $foreignEntity) {
126
-            if (! empty($foreignEntity->getChanges())) {
126
+            if (!empty($foreignEntity->getChanges())) {
127 127
                 $saveAction = $this->foreignMapper
128 128
                     ->newSaveAction($foreignEntity, ['relations' => $remainingRelations]);
129 129
                 $saveAction->addColumns($this->getExtraColumnsForAction());
Please login to merge, or discard this patch.
src/Action/Update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 
58 58
     public function revert()
59 59
     {
60
-        if (! $this->hasRun) {
60
+        if (!$this->hasRun) {
61 61
             return;
62 62
         }
63 63
         $this->entity->setPersistenceState($this->entityState);
Please login to merge, or discard this patch.