Completed
Push — master ( 3a42ce...8670ac )
by Iman
15s
created
src/controllers/ApiController/ExecuteApi.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     private function filterRows($data, $parameters, $posts, $table, $typeExcept)
226 226
     {
227
-        $data->where(function ($w) use ($parameters, $posts, $table, $typeExcept) {
227
+        $data->where(function($w) use ($parameters, $posts, $table, $typeExcept) {
228 228
             foreach ($parameters as $param) {
229 229
                 $name = $param['name'];
230 230
                 $type = $param['type'];
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
                     $row->$k = asset($v);
317 317
                 }
318 318
 
319
-                if (! in_array($k, $responsesFields)) {
319
+                if (!in_array($k, $responsesFields)) {
320 320
                     unset($row[$k]);
321 321
                 }
322 322
             }
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
                 $rows->$k = asset($v);
380 380
             }
381 381
 
382
-            if (! in_array($k, $responsesFields)) {
382
+            if (!in_array($k, $responsesFields)) {
383 383
                 unset($row[$k]);
384 384
             }
385 385
         }
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
             $subquery = $resp['subquery'];
403 403
             $used = intval($resp['used']);
404 404
 
405
-            if ($used == 0 && ! DbInspector::isForeignKey($name)) {
405
+            if ($used == 0 && !DbInspector::isForeignKey($name)) {
406 406
                 continue;
407 407
             }
408 408
 
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
      */
458 458
     private function applyLike($data, $search_in, $value)
459 459
     {
460
-        $data->where(function ($w) use ($search_in, $value) {
460
+        $data->where(function($w) use ($search_in, $value) {
461 461
             foreach ($search_in as $k => $field) {
462 462
                 if ($k == 0) {
463 463
                     $w->where($field, "like", "%$value%");
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
      */
479 479
     private function joinRelatedTables($table, $responsesFields, $name, $data, $nameTmp)
480 480
     {
481
-        if (! DbInspector::isForeignKey($name)) {
481
+        if (!DbInspector::isForeignKey($name)) {
482 482
             return $nameTmp;
483 483
         }
484 484
         $jointable = CRUDBooster::getTableForeignKey($name);
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
     private function validateMethodType($row_api, $result, $debugModeMessage, $posts)
506 506
     {
507 507
         $methodType = $row_api->method_type;
508
-        if (! $methodType || ! Request::isMethod($methodType)) {
508
+        if (!$methodType || !Request::isMethod($methodType)) {
509 509
             $result['api_status'] = 0;
510 510
             $result['api_message'] = "The request method is not allowed !";
511 511
 
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
      */
544 544
     private function checkApiDefined($row_api, $result, $debugModeMessage, $posts)
545 545
     {
546
-        if (! $row_api) {
546
+        if (!$row_api) {
547 547
             $result['api_status'] = 0;
548 548
             $result['api_message'] = 'Sorry this API is no longer available, maybe has changed by admin, or please make sure api url is correct.';
549 549
 
@@ -613,11 +613,11 @@  discard block
 block discarded – undo
613 613
                     $value = $param['config'];
614 614
                 }
615 615
 
616
-                if ($required && $type == 'password' && ! Hash::check($value, $row->{$name})) {
616
+                if ($required && $type == 'password' && !Hash::check($value, $row->{$name})) {
617 617
                     $this->passwordError($result, $debugModeMessage, $posts);
618 618
                 }
619 619
 
620
-                if (! $required && $used && $value && ! Hash::check($value, $row->{$name})) {
620
+                if (!$required && $used && $value && !Hash::check($value, $row->{$name})) {
621 621
                     $this->passwordError($result, $debugModeMessage, $posts);
622 622
                 }
623 623
             }
Please login to merge, or discard this patch.