Passed
Pull Request — master (#1116)
by Iman
03:38
created
src/Modules/ModuleGenerator/ControllerGenerator/FormConfigGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 
127 127
         $arr = array_get([
128 128
             'text' => ['textarea', "string|min:5", []],
129
-            'date' => ['date', "date", ['php_format' => 'M, d Y', 'datepicker_format' => 'M, dd YYYY',]],
130
-            'datetime' => ['datetime', "date_format:Y-m-d H:i:s", ['php_format' => 'M, d Y H:i',]],
129
+            'date' => ['date', "date", ['php_format' => 'M, d Y', 'datepicker_format' => 'M, dd YYYY', ]],
130
+            'datetime' => ['datetime', "date_format:Y-m-d H:i:s", ['php_format' => 'M, d Y H:i', ]],
131 131
             'time' => ['time', 'date_format:H:i:s', []],
132 132
             'double' => ['money', "integer|min:0", []],
133 133
             'int' => ['number', 'integer|min:0', []],
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     private static function handleForeignKey($field)
148 148
     {
149 149
         $jointable = str_replace(['id_', '_id'], '', $field);
150
-        if (! Schema::hasTable($jointable)) {
150
+        if (!Schema::hasTable($jointable)) {
151 151
             return ['', ''];
152 152
         }
153 153
         $options = [
Please login to merge, or discard this patch.
src/CBCoreModule/RouteController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     private static function getControllerMethods($ctrl)
64 64
     {
65 65
         $controller_methods = (new \ReflectionClass($ctrl))->getMethods(\ReflectionMethod::IS_PUBLIC);
66
-        $controller_methods = array_filter($controller_methods, function ($method) {
66
+        $controller_methods = array_filter($controller_methods, function($method) {
67 67
             return ($method->class !== 'Illuminate\Routing\Controller' && $method->name !== 'getIndex');
68 68
         });
69 69
 
Please login to merge, or discard this patch.
src/controllers/CBController/IndexAjax.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         $datatableWhere = urldecode(request('datatable_where'));
16 16
         $foreignKeyName = request('fk_name');
17 17
         $foreignKeyValue = request('fk_value');
18
-        if (! $table || ! $label || ! $foreignKeyName || ! $foreignKeyValue) {
18
+        if (!$table || !$label || !$foreignKeyName || !$foreignKeyValue) {
19 19
             return response()->json([]);
20 20
         }
21 21
         $query = DB::table($table);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function getDataQuery()
52 52
     {
53 53
         $key = request('query');
54
-        if (! Cache::has($key)) {
54
+        if (!Cache::has($key)) {
55 55
             return response()->json(['items' => []]);
56 56
         }
57 57
         $query = Cache::get($key);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         if (request('q')) {
94 94
             return;
95 95
         }
96
-        $result->where(function ($where) use ($columns) {
96
+        $result->where(function($where) use ($columns) {
97 97
             foreach ($columns as $c => $col) {
98 98
                 if ($c == 0) {
99 99
                     $where->where($col, 'like', '%'.request('q').'%');
Please login to merge, or discard this patch.
src/controllers/ApiController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
      * @param $name
75 75
      * @return mixed
76 76
      */
77
-   /* private function handleBase64($value, $uploads_format_candidate, $row_assign, $name)
77
+    /* private function handleBase64($value, $uploads_format_candidate, $row_assign, $name)
78 78
     {
79 79
         $filedata = base64_decode($value);
80 80
         $f = finfo_open();
Please login to merge, or discard this patch.
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, $type_except)
228 228
     {
229
-        $data->where(function ($w) use ($parameters, $posts, $table, $type_except) {
229
+        $data->where(function($w) use ($parameters, $posts, $table, $type_except) {
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, $responses_fields)) {
321
+                if (!in_array($k, $responses_fields)) {
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, $responses_fields)) {
384
+            if (!in_array($k, $responses_fields)) {
385 385
                 unset($row[$k]);
386 386
             }
387 387
         }
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
             $subquery = $resp['subquery'];
404 404
             $used = intval($resp['used']);
405 405
 
406
-            if ($used == 0 && ! DbInspector::isForeignKey($name)) {
406
+            if ($used == 0 && !DbInspector::isForeignKey($name)) {
407 407
                 continue;
408 408
             }
409 409
 
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
      */
459 459
     private function applyLike($data, $search_in, $value)
460 460
     {
461
-        $data->where(function ($w) use ($search_in, $value) {
461
+        $data->where(function($w) use ($search_in, $value) {
462 462
             foreach ($search_in as $k => $field) {
463 463
                 if ($k == 0) {
464 464
                     $w->where($field, "like", "%$value%");
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
     private function validateMethodType($row_api, $result, $debugModeMessage, $posts)
507 507
     {
508 508
         $method_type = $row_api->method_type;
509
-        if (! $method_type || ! Request::isMethod($method_type)) {
509
+        if (!$method_type || !Request::isMethod($method_type)) {
510 510
             $result['api_status'] = 0;
511 511
             $result['api_message'] = "The request method is not allowed !";
512 512
 
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
      */
545 545
     private function checkApiDefined($row_api, $result, $debugModeMessage, $posts)
546 546
     {
547
-        if (! $row_api) {
547
+        if (!$row_api) {
548 548
             $result['api_status'] = 0;
549 549
             $result['api_message'] = 'Sorry this API is no longer available, maybe has changed by admin, or please make sure api url is correct.';
550 550
 
@@ -611,11 +611,11 @@  discard block
 block discarded – undo
611 611
                         $value = $param['config'];
612 612
                     }
613 613
 
614
-                    if ($required && $type == 'password' && ! Hash::check($value, $row->{$name})) {
614
+                    if ($required && $type == 'password' && !Hash::check($value, $row->{$name})) {
615 615
                         $this->passwordError($result, $debugModeMessage, $posts);
616 616
                     }
617 617
 
618
-                    if (! $required && $used && $value && ! Hash::check($value, $row->{$name})) {
618
+                    if (!$required && $used && $value && !Hash::check($value, $row->{$name})) {
619 619
                         $this->passwordError($result, $debugModeMessage, $posts);
620 620
                     }
621 621
                 }
Please login to merge, or discard this patch.