Passed
Push — master ( 435178...db7453 )
by Francis
01:16 queued 10s
created
libraries/JSONP.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
       return true;
33 33
     }
34 34
     if (is_array($data)) {
35
-      $this->data =& $data;
35
+      $this->data = & $data;
36 36
       //var_dump($this->data);
37 37
       return true;
38 38
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
    */
97 97
   private function run_json_path(string $path):void
98 98
   {
99
-    $this->buffer =& $this->data;
99
+    $this->buffer = & $this->data;
100 100
     unset($this->pool);
101 101
     $this->pool = null;
102 102
     $this->poolKey = null;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         default:
110 110
           if ($this->exact_match(self::FIELD_REGEX, $step)) {
111 111
             if ($this->pool == null) {
112
-              $this->buffer =& $this->buffer[$step];
112
+              $this->buffer = & $this->buffer[$step];
113 113
             } else {
114 114
               $this->poolKey = $step;
115 115
             }
@@ -119,18 +119,18 @@  discard block
 block discarded – undo
119 119
             if (preg_match(self::SPECIFIC_ARRAY_REGEX, $step)) {
120 120
               list($key, $index) = $this->parse_specific_array_notation($step);
121 121
               if ($this->pool == null) {
122
-                $this->buffer =& $this->buffer[$key][$index];
122
+                $this->buffer = & $this->buffer[$key][$index];
123 123
               } else {
124 124
                 $this->poolKey = [$key, $index];
125 125
               }
126 126
               if ($loopIndex == count($steps) - 1) { break; } else { continue; }
127 127
             }
128 128
             if ($step == '[*]' || $step == '*') {
129
-              $this->pool =& $this->buffer[$this->get_key_from_notation($step)];
129
+              $this->pool = & $this->buffer[$this->get_key_from_notation($step)];
130 130
               if ($loopIndex == count($steps) - 1) { break; } else { continue; }
131 131
             }
132 132
             if (preg_match(self::ALL_ARRAY_REGEX, $step)) {
133
-              $this->pool =& $this->buffer[$this->get_key_from_notation($step)];
133
+              $this->pool = & $this->buffer[$this->get_key_from_notation($step)];
134 134
               if ($loopIndex == count($steps) - 1) { break; } else { continue; }
135 135
             }
136 136
           }
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,9 +57,13 @@
 block discarded – undo
57 57
   {
58 58
     $this->run_json_path($path);
59 59
 
60
-    if ($this->pool == null) return $this->buffer;
60
+    if ($this->pool == null) {
61
+      return $this->buffer;
62
+    }
61 63
 
62
-    if ($this->poolKey == null) return $this->pool;
64
+    if ($this->poolKey == null) {
65
+      return $this->pool;
66
+    }
63 67
 
64 68
     if (is_scalar($this->poolKey)) {
65 69
       $values = [];
Please login to merge, or discard this patch.