Passed
Pull Request — master (#1114)
by Iman
04:07
created
src/Modules/EmailTemplates/CbEmailTemplatesServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function boot()
15 15
     {
16 16
         $this->app['view']->addNamespace('CbEmailTpl', __DIR__.'/views');
17
-        $this->loadRoutesFrom( __DIR__.'/email_templates_routes.php');
17
+        $this->loadRoutesFrom(__DIR__.'/email_templates_routes.php');
18 18
     }
19 19
 
20 20
     /**
Please login to merge, or discard this patch.
src/commands/CrudboosterInstallationCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $printer->printHeader();
40 40
 
41 41
         $passes = (new RequirementChecker($this))->check();
42
-        if(!$passes) {
42
+        if (!$passes) {
43 43
             $this->info('Sorry unfortunately your system is not meet with our requirements !');
44 44
             $printer->printFooter(false);
45 45
             $this->info('--');
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
         $this->symlinkForAsset();
61 61
       
62 62
 
63
-		if($this->confirm('Do you have setting the database configuration at .env ?')) {
63
+		if ($this->confirm('Do you have setting the database configuration at .env ?')) {
64 64
             $this->installCrudbooster();
65
-		}else{
65
+		} else {
66 66
 			$this->info('Setup Aborted !');
67 67
 			$this->info('Please setting the database configuration for first !');
68 68
 		}
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         if (!file_exists($vendorPath)) {
113 113
             $this->info('Creating public/vendor/crudbooster symlink...');
114 114
             app('files')->link(__DIR__.'/../assets', public_path('vendor/crudbooster'));
115
-            return ;
115
+            return;
116 116
         }
117 117
 
118 118
         $this->info('Vendor Path: '.$vendorPath);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $this->info('Migrating database...');
148 148
         $this->call('migrate', ['--path'=> '\database\migrations\crudbooster']);
149 149
 
150
-        if (! class_exists('CBSeeder')) {
150
+        if (!class_exists('CBSeeder')) {
151 151
             require_once __DIR__.'/../database/seeds/CBSeeder.php';
152 152
         }
153 153
         $this->callSilent('db:seed', ['--class' => 'CBSeeder']);
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
     private function createVendorAtPublic()
161 161
     {
162 162
         $this->info('Checking public/vendor directory...');
163
-        if (! file_exists(public_path('vendor'))) {
163
+        if (!file_exists(public_path('vendor'))) {
164 164
             mkdir(public_path('vendor'), 0777);
165 165
         }
166 166
 
167
-        if (! is_writable(public_path('vendor'))) {
167
+        if (!is_writable(public_path('vendor'))) {
168 168
             $this->info('Setup aborted !');
169 169
             $this->info('Please set public/vendor directory to writable 0777');
170 170
             exit;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     */
176 176
     private function rrmdir($dir)
177 177
     {
178
-        if (! is_dir($dir)) {
178
+        if (!is_dir($dir)) {
179 179
             return;
180 180
         }
181 181
         foreach (scandir($dir) as $object) {
Please login to merge, or discard this patch.
src/commands/RequirementChecker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
      */
77 77
     private function chechExtension($extension)
78 78
     {
79
-        if (! extension_loaded($extension)) {
79
+        if (!extension_loaded($extension)) {
80 80
             $this->console->info($extension.' extension: [Bad]');
81 81
             return $this->requirements = false;
82 82
         }
Please login to merge, or discard this patch.
src/Modules/ModuleGenerator/FileManipulator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
 
230 230
     public static function stringify($input, $indent = "")
231 231
     {
232
-        if (! is_array($input)) {
232
+        if (!is_array($input)) {
233 233
             return var_export($input, true);
234 234
         }
235 235
         $buffer = [];
Please login to merge, or discard this patch.
src/Modules/ModuleGenerator/ScaffoldingParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
         $colsItem = self::extractLines($code, $type);
10 10
 
11 11
         foreach ($colsItem as &$item) {
12
-            $item = str_replace(' ','', $item);
13
-            $item = str_replace('\',]',']', $item);
12
+            $item = str_replace(' ', '', $item);
13
+            $item = str_replace('\',]', ']', $item);
14 14
             $item = trim($item);
15 15
             $item = trim($item, '[');
16 16
             $item = trim($item, '];');
Please login to merge, or discard this patch.
src/Modules/ModuleGenerator/Step2Handler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $columnScript[] = '            $this->col[] = [];';
62 62
         foreach ($labels as $i => $label) {
63 63
 
64
-            if (! $name[$i]) {
64
+            if (!$name[$i]) {
65 65
                 continue;
66 66
             }
67 67
 
Please login to merge, or discard this patch.
src/helpers/CRUDBooster.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     public static function first($table, $id)
154 154
     {
155 155
         $table = self::parseSqlTable($table)['table'];
156
-        if (! is_array($id)) {
156
+        if (!is_array($id)) {
157 157
             $pk = self::pk($table);
158 158
 
159 159
             return DB::table($table)->where($pk, $id)->first();
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         $controllerName = basename($controllerName);
248 248
         $route_url = route($controllerName.'GetIndex');
249 249
 
250
-        if (! $path) {
250
+        if (!$path) {
251 251
             return trim($route_url, '/');
252 252
         }
253 253
 
Please login to merge, or discard this patch.
src/CBCoreModule/ViewHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
         @$get = $_GET;
10 10
         $inputhtml = '';
11 11
 
12
-        if (! $get) {
12
+        if (!$get) {
13 13
             return $inputhtml;
14 14
         }
15 15
         if (is_array($exception)) {
Please login to merge, or discard this patch.
src/controllers/ApiController/ExecuteApi.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
         | ----------------------------------------------
54 54
         |
55 55
         */
56
-        if (! $row_api->method_type) {
56
+        if (!$row_api->method_type) {
57 57
             return;
58 58
         }
59 59
         $method_type = $row_api->method_type;
60
-        if ($method_type && ! Request::isMethod($method_type)) {
60
+        if ($method_type && !Request::isMethod($method_type)) {
61 61
             $result['api_status'] = 0;
62 62
             $result['api_message'] = "The request method is not allowed !";
63 63
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         | ----------------------------------------------
71 71
         |
72 72
         */
73
-        if (! $row_api) {
73
+        if (!$row_api) {
74 74
             $result['api_status'] = 0;
75 75
             $result['api_message'] = 'Sorry this API is no longer available, maybe has changed by admin, or please make sure api url is correct.';
76 76
 
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
                             $value = $param['config'];
174 174
                         }
175 175
 
176
-                        if ($required && $type == 'password' && ! Hash::check($value, $rows->{$name})) {
176
+                        if ($required && $type == 'password' && !Hash::check($value, $rows->{$name})) {
177 177
                             return $this->passwordError($result, $debug_mode_message, $posts);
178 178
                         }
179 179
 
180
-                        if (! $required && $used && $value && ! Hash::check($value, $row->{$name})) {
180
+                        if (!$required && $used && $value && !Hash::check($value, $row->{$name})) {
181 181
                             return $this->passwordError($result, $debug_mode_message, $posts);
182 182
                         }
183 183
                     }
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
      */
305 305
     private function filterRows($data, $parameters, $posts, $table, $type_except)
306 306
     {
307
-        $data->where(function ($w) use ($parameters, $posts, $table, $type_except) {
307
+        $data->where(function($w) use ($parameters, $posts, $table, $type_except) {
308 308
             foreach ($parameters as $param) {
309 309
                 $name = $param['name'];
310 310
                 $type = $param['type'];
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
                     $row->$k = asset($v);
397 397
                 }
398 398
 
399
-                if (! in_array($k, $responses_fields)) {
399
+                if (!in_array($k, $responses_fields)) {
400 400
                     unset($row[$k]);
401 401
                 }
402 402
             }
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
                 $rows->$k = asset($v);
460 460
             }
461 461
 
462
-            if (! in_array($k, $responses_fields)) {
462
+            if (!in_array($k, $responses_fields)) {
463 463
                 unset($row[$k]);
464 464
             }
465 465
         }
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
             $subquery = $resp['subquery'];
482 482
             $used = intval($resp['used']);
483 483
 
484
-            if ($used == 0 && ! DbInspector::isForeignKey($name)) {
484
+            if ($used == 0 && !DbInspector::isForeignKey($name)) {
485 485
                 continue;
486 486
             }
487 487
 
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
      */
537 537
     private function applyLike($data, $search_in, $value)
538 538
     {
539
-        $data->where(function ($w) use ($search_in, $value) {
539
+        $data->where(function($w) use ($search_in, $value) {
540 540
             foreach ($search_in as $k => $field) {
541 541
                 if ($k == 0) {
542 542
                     $w->where($field, "like", "%$value%");
Please login to merge, or discard this patch.