Passed
Push — master ( bed64a...76574d )
by Richard
05:24 queued 11s
created
src/ArtomatorServiceProvider.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -64,168 +64,168 @@
 block discarded – undo
64 64
     {
65 65
         $this->app->singleton(
66 66
             'artomator.publish',
67
-            function ($app) {
67
+            function($app) {
68 68
                 return new GeneratorPublishCommand();
69 69
             }
70 70
         );
71 71
 
72 72
         $this->app->singleton(
73 73
             'artomator.api',
74
-            function ($app) {
74
+            function($app) {
75 75
                 return new APIGeneratorCommand();
76 76
             }
77 77
         );
78 78
 
79 79
         $this->app->singleton(
80 80
             'artomator.scaffold',
81
-            function ($app) {
81
+            function($app) {
82 82
                 return new ScaffoldGeneratorCommand();
83 83
             }
84 84
         );
85 85
 
86 86
         $this->app->singleton(
87 87
             'artomator.publish.layout',
88
-            function ($app) {
88
+            function($app) {
89 89
                 return new LayoutPublishCommand();
90 90
             }
91 91
         );
92 92
 
93 93
         $this->app->singleton(
94 94
             'artomator.publish.templates',
95
-            function ($app) {
95
+            function($app) {
96 96
                 return new PublishTemplateCommand();
97 97
             }
98 98
         );
99 99
 
100 100
         $this->app->singleton(
101 101
             'artomator.api_scaffold',
102
-            function ($app) {
102
+            function($app) {
103 103
                 return new APIScaffoldGeneratorCommand();
104 104
             }
105 105
         );
106 106
 
107 107
         $this->app->singleton(
108 108
             'artomator.migration',
109
-            function ($app) {
109
+            function($app) {
110 110
                 return new MigrationGeneratorCommand();
111 111
             }
112 112
         );
113 113
 
114 114
         $this->app->singleton(
115 115
             'artomator.model',
116
-            function ($app) {
116
+            function($app) {
117 117
                 return new ModelGeneratorCommand();
118 118
             }
119 119
         );
120 120
 
121 121
         $this->app->singleton(
122 122
             'artomator.repository',
123
-            function ($app) {
123
+            function($app) {
124 124
                 return new RepositoryGeneratorCommand();
125 125
             }
126 126
         );
127 127
 
128 128
         $this->app->singleton(
129 129
             'artomator.api.controller',
130
-            function ($app) {
130
+            function($app) {
131 131
                 return new APIControllerGeneratorCommand();
132 132
             }
133 133
         );
134 134
 
135 135
         $this->app->singleton(
136 136
             'artomator.api.requests',
137
-            function ($app) {
137
+            function($app) {
138 138
                 return new APIRequestsGeneratorCommand();
139 139
             }
140 140
         );
141 141
 
142 142
         $this->app->singleton(
143 143
             'artomator.api.tests',
144
-            function ($app) {
144
+            function($app) {
145 145
                 return new TestsGeneratorCommand();
146 146
             }
147 147
         );
148 148
 
149 149
         $this->app->singleton(
150 150
             'artomator.scaffold.controller',
151
-            function ($app) {
151
+            function($app) {
152 152
                 return new ControllerGeneratorCommand();
153 153
             }
154 154
         );
155 155
 
156 156
         $this->app->singleton(
157 157
             'artomator.scaffold.requests',
158
-            function ($app) {
158
+            function($app) {
159 159
                 return new RequestsGeneratorCommand();
160 160
             }
161 161
         );
162 162
 
163 163
         $this->app->singleton(
164 164
             'artomator.scaffold.views',
165
-            function ($app) {
165
+            function($app) {
166 166
                 return new ViewsGeneratorCommand();
167 167
             }
168 168
         );
169 169
 
170 170
         $this->app->singleton(
171 171
             'artomator.scaffold.routes',
172
-            function ($app) {
172
+            function($app) {
173 173
                 return new RoutesGeneratorCommand();
174 174
             }
175 175
         );
176 176
 
177 177
         $this->app->singleton(
178 178
             'artomator.rollback',
179
-            function ($app) {
179
+            function($app) {
180 180
                 return new RollbackGeneratorCommand();
181 181
             }
182 182
         );
183 183
 
184 184
         $this->app->singleton(
185 185
             'artomator.publish.user',
186
-            function ($app) {
186
+            function($app) {
187 187
                 return new PublishUserCommand();
188 188
             }
189 189
         );
190 190
 
191 191
         $this->app->singleton(
192 192
             'artomator.graphql',
193
-            function ($app) {
193
+            function($app) {
194 194
                 return new GraphQLGeneratorCommand();
195 195
             }
196 196
         );
197 197
 
198 198
         $this->app->singleton(
199 199
             'artomator.graphql_scaffold',
200
-            function ($app) {
200
+            function($app) {
201 201
                 return new GraphQLScaffoldGeneratorCommand();
202 202
             }
203 203
         );
204 204
 
205 205
         $this->app->singleton(
206 206
             'artomator.graphql.query',
207
-            function ($app) {
207
+            function($app) {
208 208
                 return new GraphQLQueryGeneratorCommand();
209 209
             }
210 210
         );
211 211
 
212 212
         $this->app->singleton(
213 213
             'artomator.graphql.mutations',
214
-            function ($app) {
214
+            function($app) {
215 215
                 return new GraphQLMutationsGeneratorCommand();
216 216
             }
217 217
         );
218 218
 
219 219
         $this->app->singleton(
220 220
             'artomator.graphql.type',
221
-            function ($app) {
221
+            function($app) {
222 222
                 return new GraphQLTypeGeneratorCommand();
223 223
             }
224 224
         );
225 225
 
226 226
         $this->app->singleton(
227 227
             'artomator.graphql.subscription',
228
-            function ($app) {
228
+            function($app) {
229 229
                 return new GraphQLSubscriptionGeneratorCommand();
230 230
             }
231 231
         );
Please login to merge, or discard this patch.
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/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.
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];
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         $length = strlen($newModelStatement);
222 222
         $isNameSpaceExist = strpos($mainViewContent, $newModelStatement);
223 223
         $newModelStatement = infy_nl().$newModelStatement.infy_nl_tab().'\''.$view.'\','.infy_nl();
224
-        if (! $isNameSpaceExist) {
224
+        if (!$isNameSpaceExist) {
225 225
             preg_match_all('/selects = \[/', $mainViewContent, $matches);
226 226
             $totalMatches = count($matches[0]);
227 227
             $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,7 +240,7 @@  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
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
             $minMaxRules = '';
249 249
             $required = '';
250 250
             foreach ($validations as $validation) {
251
-                if (! Str::contains($validation, ['max:', 'min:'])) {
251
+                if (!Str::contains($validation, ['max:', 'min:'])) {
252 252
                     continue;
253 253
                 }
254 254
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
                 $inputArr = explode(',', $field->htmlValues[1]);
280 280
                 $columns = '';
281 281
                 foreach ($inputArr as $item) {
282
-                    $columns .= "'$item'".',';  //e.g 'email,id,'
282
+                    $columns .= "'$item'".','; //e.g 'email,id,'
283 283
                 }
284 284
                 $columns = substr_replace($columns, '', -1); // remove last ,
285 285
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 
293 293
                 $tableName = $this->commandData->config->tableName;
294 294
                 $viewPath = $this->commandData->config->prefixes['view'];
295
-                if (! empty($viewPath)) {
295
+                if (!empty($viewPath)) {
296 296
                     $tableName = $viewPath.'.'.$tableName;
297 297
                 }
298 298
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
                 $fieldTemplate = $this->generateViewComposer($tableName, $variableName, $columns, $selectTable, $modalName);
302 302
             }
303 303
 
304
-            if (! empty($fieldTemplate)) {
304
+            if (!empty($fieldTemplate)) {
305 305
                 $fieldTemplate = fill_template_with_field_data(
306 306
                     $this->commandData->dynamicVars,
307 307
                     $this->commandData->fieldNamesMapping,
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
         $fieldsStr = '';
386 386
 
387 387
         foreach ($this->commandData->fields as $field) {
388
-            if (! $field->inView) {
388
+            if (!$field->inView) {
389 389
                 continue;
390 390
             }
391 391
             $singleFieldStr = str_replace(
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
             'show_fields.blade.php',
432 432
         ];
433 433
 
434
-        if (! empty($views)) {
434
+        if (!empty($views)) {
435 435
             $files = [];
436 436
             foreach ($views as $view) {
437 437
                 $files[] = $view.'.blade.php';
Please login to merge, or discard this patch.