Passed
Push — master ( fdf013...12bd2a )
by Igor
03:22
created
src/Statement.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * @var int
85 85
      */
86
-    public $iterator=0;
86
+    public $iterator = 0;
87 87
 
88 88
 
89 89
     public function __construct(CurlerRequest $request)
@@ -221,15 +221,15 @@  discard block
 block discarded – undo
221 221
             $this->_init = true;
222 222
             return false;
223 223
         }
224
-        $data=[];
224
+        $data = [];
225 225
         foreach (['meta', 'data', 'totals', 'extremes', 'rows', 'rows_before_limit_at_least', 'statistics'] as $key) {
226 226
 
227 227
             if (isset($this->_rawData[$key])) {
228
-                if ($key=='data')
228
+                if ($key == 'data')
229 229
                 {
230
-                    $data=$this->_rawData[$key];
230
+                    $data = $this->_rawData[$key];
231 231
                 }
232
-                else{
232
+                else {
233 233
                     $this->{$key} = $this->_rawData[$key];
234 234
                 }
235 235
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             throw  new QueryException('Can`t find meta');
241 241
         }
242 242
 
243
-        $isJSONCompact=(stripos($this->format,'JSONCompact')!==false?true:false);
243
+        $isJSONCompact = (stripos($this->format, 'JSONCompact') !== false ?true:false);
244 244
         $this->array_data = [];
245 245
         foreach ($data as $rows) {
246 246
             $r = [];
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
             if ($isJSONCompact)
250 250
             {
251
-                $r[]=$rows;
251
+                $r[] = $rows;
252 252
             }
253 253
             else {
254 254
                 foreach ($this->meta as $meta) {
@@ -404,14 +404,14 @@  discard block
 block discarded – undo
404 404
      */
405 405
     public function resetIterator()
406 406
     {
407
-        $this->iterator=0;
407
+        $this->iterator = 0;
408 408
     }
409 409
 
410 410
     public function fetchRow($key = null)
411 411
     {
412 412
         $this->init();
413 413
 
414
-        $position=$this->iterator;
414
+        $position = $this->iterator;
415 415
 
416 416
         if (!isset($this->array_data[$position])) {
417 417
             return null;
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -228,8 +228,7 @@  discard block
 block discarded – undo
228 228
                 if ($key=='data')
229 229
                 {
230 230
                     $data=$this->_rawData[$key];
231
-                }
232
-                else{
231
+                } else{
233 232
                     $this->{$key} = $this->_rawData[$key];
234 233
                 }
235 234
 
@@ -249,8 +248,7 @@  discard block
 block discarded – undo
249 248
             if ($isJSONCompact)
250 249
             {
251 250
                 $r[]=$rows;
252
-            }
253
-            else {
251
+            } else {
254 252
                 foreach ($this->meta as $meta) {
255 253
                     $r[$meta['name']] = $rows[$meta['name']];
256 254
                 }
@@ -364,7 +362,9 @@  discard block
 block discarded – undo
364 362
             return null;
365 363
         }
366 364
 
367
-        if (!$key) return $this->statistics;
365
+        if (!$key) {
366
+            return $this->statistics;
367
+        }
368 368
 
369 369
         if (!isset($this->statistics[$key])) {
370 370
             return null;
Please login to merge, or discard this patch.