Passed
Pull Request — master (#1132)
by Iman
04:36 queued 30s
created
src/controllers/ApiController/ExecuteApi.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      */
227 227
     private function filterRows($data, $parameters, $posts, $table, $typeExcept)
228 228
     {
229
-        $data->where(function ($w) use ($parameters, $posts, $table, $typeExcept) {
229
+        $data->where(function($w) use ($parameters, $posts, $table, $typeExcept) {
230 230
             foreach ($parameters as $param) {
231 231
                 $name = $param['name'];
232 232
                 $type = $param['type'];
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
                     $row->$k = asset($v);
319 319
                 }
320 320
 
321
-                if (! in_array($k, $responsesFields)) {
321
+                if (!in_array($k, $responsesFields)) {
322 322
                     unset($row[$k]);
323 323
                 }
324 324
             }
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
                 $rows->$k = asset($v);
382 382
             }
383 383
 
384
-            if (! in_array($k, $responsesFields)) {
384
+            if (!in_array($k, $responsesFields)) {
385 385
                 unset($row[$k]);
386 386
             }
387 387
         }
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             $subquery = $resp['subquery'];
405 405
             $used = intval($resp['used']);
406 406
 
407
-            if ($used == 0 && ! DbInspector::isForeignKey($name)) {
407
+            if ($used == 0 && !DbInspector::isForeignKey($name)) {
408 408
                 continue;
409 409
             }
410 410
 
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
      */
460 460
     private function applyLike($data, $search_in, $value)
461 461
     {
462
-        $data->where(function ($w) use ($search_in, $value) {
462
+        $data->where(function($w) use ($search_in, $value) {
463 463
             foreach ($search_in as $k => $field) {
464 464
                 if ($k == 0) {
465 465
                     $w->where($field, "like", "%$value%");
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
     private function validateMethodType($row_api, $result, $debugModeMessage, $posts)
508 508
     {
509 509
         $method_type = $row_api->method_type;
510
-        if (! $method_type || ! Request::isMethod($method_type)) {
510
+        if (!$method_type || !Request::isMethod($method_type)) {
511 511
             $result['api_status'] = 0;
512 512
             $result['api_message'] = "The request method is not allowed !";
513 513
 
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
      */
546 546
     private function checkApiDefined($row_api, $result, $debugModeMessage, $posts)
547 547
     {
548
-        if (! $row_api) {
548
+        if (!$row_api) {
549 549
             $result['api_status'] = 0;
550 550
             $result['api_message'] = 'Sorry this API is no longer available, maybe has changed by admin, or please make sure api url is correct.';
551 551
 
@@ -615,11 +615,11 @@  discard block
 block discarded – undo
615 615
                     $value = $param['config'];
616 616
                 }
617 617
 
618
-                if ($required && $type == 'password' && ! Hash::check($value, $row->{$name})) {
618
+                if ($required && $type == 'password' && !Hash::check($value, $row->{$name})) {
619 619
                     $this->passwordError($result, $debugModeMessage, $posts);
620 620
                 }
621 621
 
622
-                if (! $required && $used && $value && ! Hash::check($value, $row->{$name})) {
622
+                if (!$required && $used && $value && !Hash::check($value, $row->{$name})) {
623 623
                     $this->passwordError($result, $debugModeMessage, $posts);
624 624
                 }
625 625
             }
Please login to merge, or discard this patch.