Passed
Push — master ( 5b2ba6...cbe18c )
by Beau
01:51
created
src/Data.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function append(string $key, $value = null): void
46 46
     {
47
-        $currentValue =& $this->data;
47
+        $currentValue = & $this->data;
48 48
         $keyPath = $this->keyToPathArray($key);
49 49
 
50 50
         if (1 == count($keyPath)) {
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 
64 64
         $endKey = array_pop($keyPath);
65 65
         for ($i = 0; $i < count($keyPath); $i++) {
66
-            $currentKey =& $keyPath[$i];
67
-            if (! isset($currentValue[$currentKey])) {
66
+            $currentKey = & $keyPath[$i];
67
+            if (!isset($currentValue[$currentKey])) {
68 68
                 $currentValue[$currentKey] = [];
69 69
             }
70
-            $currentValue =& $currentValue[$currentKey];
70
+            $currentValue = & $currentValue[$currentKey];
71 71
         }
72 72
 
73 73
         if (!isset($currentValue[$endKey])) {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function set(string $key, $value = null): void
88 88
     {
89
-        $currentValue =& $this->data;
89
+        $currentValue = & $this->data;
90 90
         $keyPath = $this->keyToPathArray($key);
91 91
 
92 92
         if (1 == count($keyPath)) {
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
 
98 98
         $endKey = array_pop($keyPath);
99 99
         for ($i = 0; $i < count($keyPath); $i++) {
100
-            $currentKey =& $keyPath[$i];
100
+            $currentKey = & $keyPath[$i];
101 101
             if (!isset($currentValue[$currentKey])) {
102 102
                 $currentValue[$currentKey] = [];
103 103
             }
104 104
             if (!is_array($currentValue[$currentKey])) {
105 105
                 throw new DataException("Key path at $currentKey of $key cannot be indexed into (is not an array)");
106 106
             }
107
-            $currentValue =& $currentValue[$currentKey];
107
+            $currentValue = & $currentValue[$currentKey];
108 108
         }
109 109
         $currentValue[$endKey] = $value;
110 110
     }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function remove(string $key): void
116 116
     {
117
-        $currentValue =& $this->data;
117
+        $currentValue = & $this->data;
118 118
         $keyPath = $this->keyToPathArray($key);
119 119
 
120 120
         if (1 == count($keyPath)) {
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
 
126 126
         $endKey = array_pop($keyPath);
127 127
         for ($i = 0; $i < count($keyPath); $i++) {
128
-            $currentKey =& $keyPath[$i];
128
+            $currentKey = & $keyPath[$i];
129 129
             if (!isset($currentValue[$currentKey])) {
130 130
                 return;
131 131
             }
132
-            $currentValue =& $currentValue[$currentKey];
132
+            $currentValue = & $currentValue[$currentKey];
133 133
         }
134 134
         unset($currentValue[$endKey]);
135 135
     }
Please login to merge, or discard this patch.