Passed
Push — master ( 48aa9a...5ad1d2 )
by Richard
10:34
created
src/Common/GeneratorConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 
59 59
         $prefix = $this->prefixes['ns'];
60 60
 
61
-        if (! empty($prefix)) {
61
+        if (!empty($prefix)) {
62 62
             $prefix = '\\'.$prefix;
63 63
         }
64 64
         $this->nsInterface = config('pwweb.artomator.namespace.interface', 'App\Interfaces').$prefix;
Please login to merge, or discard this patch.
src/Generators/ViewServiceProviderGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function addViewVariables($views, $variableName, $columns, $tableName, $modelName = null)
54 54
     {
55
-        if (! empty($modelName)) {
55
+        if (!empty($modelName)) {
56 56
             $model = $modelName;
57 57
         } else {
58 58
             $model = model_name_from_table_name($tableName);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         $customProviders = strpos($file, $searchFor);
103 103
 
104 104
         $isExist = strpos($file, "App\Providers\ViewServiceProvider::class");
105
-        if ($customProviders && ! $isExist) {
105
+        if ($customProviders && !$isExist) {
106 106
             $newChanges = substr_replace(
107 107
                 $file,
108 108
                 infy_nl().infy_tab(8).'\App\Providers\ViewServiceProvider::class,',
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $newModelStatement = 'use '.$this->commandData->config->nsInterface.'\\'.$model.'RepositoryInterface as '.$model.';';
119 119
         $isNameSpaceExist = strpos($mainViewContent, $newModelStatement);
120 120
         $newModelStatement = infy_nl().$newModelStatement;
121
-        if (! $isNameSpaceExist) {
121
+        if (!$isNameSpaceExist) {
122 122
             preg_match_all('/namespace(.*)/', $mainViewContent, $matches);
123 123
             $totalMatches = count($matches[0]);
124 124
             $nameSpaceStatement = $matches[0][$totalMatches - 1];
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $length = strlen($newModelStatement);
216 216
         $isNameSpaceExist = strpos($mainViewContent, $newModelStatement);
217 217
         $newModelStatement = infy_nl().$newModelStatement.infy_nl_tab().'\''.$view.'\','.infy_nl();
218
-        if (! $isNameSpaceExist) {
218
+        if (!$isNameSpaceExist) {
219 219
             preg_match_all('/namespace(.*)/', $mainViewContent, $matches);
220 220
             $totalMatches = count($matches[0]);
221 221
             $nameSpaceStatement = $matches[0][$totalMatches - 1];
Please login to merge, or discard this patch.
src/Generators/Scaffold/ViewGenerator.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function generate()
35 35
     {
36
-        if (! file_exists($this->path)) {
36
+        if (!file_exists($this->path)) {
37 37
             mkdir($this->path, 0755, true);
38 38
         }
39 39
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $tableBodyFields = [];
139 139
 
140 140
         foreach ($this->commandData->fields as $field) {
141
-            if (! $field->inIndex) {
141
+            if (!$field->inIndex) {
142 142
                 continue;
143 143
             }
144 144
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         $headerFields = [];
171 171
 
172 172
         foreach ($this->commandData->fields as $field) {
173
-            if (! $field->inIndex) {
173
+            if (!$field->inIndex) {
174 174
                 continue;
175 175
             }
176 176
 
@@ -240,14 +240,14 @@  discard block
 block discarded – undo
240 240
         $this->htmlFields = [];
241 241
 
242 242
         foreach ($this->commandData->fields as $field) {
243
-            if (! $field->inForm) {
243
+            if (!$field->inForm) {
244 244
                 continue;
245 245
             }
246 246
 
247 247
             $validations = explode('|', $field->validations);
248 248
             $minMaxRules = '';
249 249
             foreach ($validations as $validation) {
250
-                if (! Str::contains($validation, ['max:', 'min:'])) {
250
+                if (!Str::contains($validation, ['max:', 'min:'])) {
251 251
                     continue;
252 252
                 }
253 253
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                 $inputArr = explode(',', $field->htmlValues[1]);
271 271
                 $columns = '';
272 272
                 foreach ($inputArr as $item) {
273
-                    $columns .= "'$item'".',';  //e.g 'email,id,'
273
+                    $columns .= "'$item'".','; //e.g 'email,id,'
274 274
                 }
275 275
                 $columns = substr_replace($columns, '', -1); // remove last ,
276 276
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
                 $tableName = $this->commandData->config->tableName;
285 285
                 $viewPath = $this->commandData->config->prefixes['view'];
286
-                if (! empty($viewPath)) {
286
+                if (!empty($viewPath)) {
287 287
                     $tableName = $viewPath.'.'.$tableName;
288 288
                 }
289 289
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
                 $fieldTemplate = $this->generateViewComposer($tableName, $variableName, $columns, $selectTable, $modalName);
293 293
             }
294 294
 
295
-            if (! empty($fieldTemplate)) {
295
+            if (!empty($fieldTemplate)) {
296 296
                 $fieldTemplate = fill_template_with_field_data(
297 297
                     $this->commandData->dynamicVars,
298 298
                     $this->commandData->fieldNamesMapping,
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
         $fieldsStr = '';
377 377
 
378 378
         foreach ($this->commandData->fields as $field) {
379
-            if (! $field->inView) {
379
+            if (!$field->inView) {
380 380
                 continue;
381 381
             }
382 382
             $singleFieldStr = str_replace(
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
             'show_fields.blade.php',
423 423
         ];
424 424
 
425
-        if (! empty($views)) {
425
+        if (!empty($views)) {
426 426
             $files = [];
427 427
             foreach ($views as $view) {
428 428
                 $files[] = $view.'.blade.php';
Please login to merge, or discard this patch.
src/Commands/BaseCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         parent::generateCommonItems();
31 31
 
32
-        if (! $this->isSkip('repository') && $this->commandData->getOption('repositoryPattern')) {
32
+        if (!$this->isSkip('repository') && $this->commandData->getOption('repositoryPattern')) {
33 33
             $interfaceGenerator = new InterfaceGenerator($this->commandData);
34 34
             $interfaceGenerator->generate();
35 35
         }
Please login to merge, or discard this patch.