Passed
Push — master ( 590453...ad5a85 )
by Arthur
24:49
created
src/Foundation/Generator/Commands/ModelMakeCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
     protected function setOptions(): array
67 67
     {
68 68
         return [
69
-            ['mongo', null, InputOption::VALUE_OPTIONAL, 'Mongo model.', false],
70
-            ['migration', null, InputOption::VALUE_OPTIONAL, 'Create migration for the model.', true],
69
+            [ 'mongo', null, InputOption::VALUE_OPTIONAL, 'Mongo model.', false ],
70
+            [ 'migration', null, InputOption::VALUE_OPTIONAL, 'Create migration for the model.', true ],
71 71
         ];
72 72
     }
73 73
 
74
-    protected function handleMongoOption($shortcut, $type, $question, $default){
74
+    protected function handleMongoOption($shortcut, $type, $question, $default) {
75 75
         return $this->confirm('Is this model for a mongodb database?', $default);
76 76
     }
77 77
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         return $this->getOption('mongo');
81 81
     }
82 82
 
83
-    protected function handleMigrationOption($shortcut, $type, $question, $default){
83
+    protected function handleMigrationOption($shortcut, $type, $question, $default) {
84 84
         return $this->confirm('Do you want to create a migration for this model?', $default);
85 85
     }
86 86
 
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
         if ($this->needsMigration()) {
95 95
             if ($this->isMongoModel()) {
96 96
                 GeneratorManager::module($this->getModuleName(), $this->isOverwriteable())->createMigration(
97
-                    "Create" . ucfirst($this->getClassName()) . "Collection",
97
+                    "Create".ucfirst($this->getClassName())."Collection",
98 98
                     strtolower(split_caps_to_underscore(Str::plural($this->getClassName()))),
99 99
                     true);
100 100
             } else {
101 101
                 GeneratorManager::module($this->getModuleName(), $this->isOverwriteable())->createMigration(
102
-                    "Create" . ucfirst($this->getClassName() . "Table"),
102
+                    "Create".ucfirst($this->getClassName()."Table"),
103 103
                     strtolower(split_caps_to_underscore(Str::plural($this->getClassName()))),
104 104
                     false);
105 105
             }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         if (strtolower($class) === strtolower($this->getModuleName())) {
113 113
             return $class;
114 114
         }
115
-        return ucfirst($this->getModuleName()) . ucfirst($class);
115
+        return ucfirst($this->getModuleName()).ucfirst($class);
116 116
     }
117 117
 
118 118
     /**
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/FactoryMakeCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 
55 55
     protected function getModelName(): string
56 56
     {
57
-        return once(function () {
58
-            return $this->option('model') ?? $this->anticipate('For what model would you like to generate a factory?', [$this->getModuleName()], $this->getModuleName());
57
+        return once(function() {
58
+            return $this->option('model') ?? $this->anticipate('For what model would you like to generate a factory?', [ $this->getModuleName() ], $this->getModuleName());
59 59
         });
60 60
     }
61 61
 
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
     protected function setOptions() :array
82 82
     {
83 83
         return [
84
-            ['model', null, InputOption::VALUE_OPTIONAL, 'The Model name for the factory.', null],
84
+            [ 'model', null, InputOption::VALUE_OPTIONAL, 'The Model name for the factory.', null ],
85 85
         ];
86 86
     }
87 87
 
88
-    protected function handleCommandOption($shortcut, $type, $question, $default){
89
-        return $this->anticipate('What is the name of the model?', Larapi::getModule($this->getModuleName())->getModels()->getAllPhpFileNamesWithoutExtension(),Larapi::getModule($this->getModuleName())->getModels()->getAllPhpFileNamesWithoutExtension()[0]);
88
+    protected function handleCommandOption($shortcut, $type, $question, $default) {
89
+        return $this->anticipate('What is the name of the model?', Larapi::getModule($this->getModuleName())->getModels()->getAllPhpFileNamesWithoutExtension(), Larapi::getModule($this->getModuleName())->getModels()->getAllPhpFileNamesWithoutExtension()[ 0 ]);
90 90
     }
91 91
 }
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/TestMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
     protected function setOptions(): array
86 86
     {
87 87
         return [
88
-            ['type', $this->types, InputOption::VALUE_OPTIONAL, 'Indicates the type of the test.', $this->types[0]]
88
+            [ 'type', $this->types, InputOption::VALUE_OPTIONAL, 'Indicates the type of the test.', $this->types[ 0 ] ]
89 89
         ];
90 90
     }
91 91
 
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/ListenerMakeCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
         return [
51 51
             'NAMESPACE' => $this->getClassNamespace(),
52 52
             'CLASS' => $this->getClassName(),
53
-            'EVENTNAME' => $this->getModule()->getNamespace() . '\\' . 'Events' . '\\' . $this->getEventName(),
53
+            'EVENTNAME' => $this->getModule()->getNamespace().'\\'.'Events'.'\\'.$this->getEventName(),
54 54
             'SHORTEVENTNAME' => $this->getEventName()
55 55
         ];
56 56
     }
57 57
 
58 58
     protected function afterGeneration(): void
59 59
     {
60
-        $this->info("don't forget to add the listener to " . $this->getEventName());
60
+        $this->info("don't forget to add the listener to ".$this->getEventName());
61 61
     }
62 62
 
63 63
     /**
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
     protected function setOptions(): array
91 91
     {
92 92
         return [
93
-            ['event', null, InputOption::VALUE_OPTIONAL, 'What is the name of the event that should be listened on?', null],
94
-            ['queued', null, InputOption::VALUE_OPTIONAL, 'Should the listener be queued?', false],
93
+            [ 'event', null, InputOption::VALUE_OPTIONAL, 'What is the name of the event that should be listened on?', null ],
94
+            [ 'queued', null, InputOption::VALUE_OPTIONAL, 'Should the listener be queued?', false ],
95 95
         ];
96 96
     }
97 97
 
Please login to merge, or discard this patch.
src/Foundation/Generator/Commands/CommandMakeCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     protected function setOptions(): array
69 69
     {
70 70
         return [
71
-            ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned.', null],
71
+            [ 'command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned.', null ],
72 72
         ];
73 73
     }
74 74
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         return $this->getOption('command');
81 81
     }
82 82
 
83
-    protected function handleCommandOption($shortcut, $type, $question, $default){
84
-        return $this->ask('What is the name of the terminal command?',str_replace('command', '', strtolower($this->getModuleName()) . ':' . strtolower($this->getClassName())));
83
+    protected function handleCommandOption($shortcut, $type, $question, $default) {
84
+        return $this->ask('What is the name of the terminal command?', str_replace('command', '', strtolower($this->getModuleName()).':'.strtolower($this->getClassName())));
85 85
     }
86 86
 }
Please login to merge, or discard this patch.
src/Foundation/Generator/Managers/GeneratorManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@
 block discarded – undo
58 58
      */
59 59
     protected function alterOptions($options)
60 60
     {
61
-        $options['module'] = Str::studly($this->moduleName);
61
+        $options[ 'module' ] = Str::studly($this->moduleName);
62 62
         if ($this->overwrite)
63
-            $options['--overwrite'] = null;
63
+            $options[ '--overwrite' ] = null;
64 64
         return $options;
65 65
     }
66 66
 
Please login to merge, or discard this patch.
src/Foundation/Generator/Abstracts/AbstractGeneratorCommand.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @var array
57 57
      */
58
-    protected $optionData = [];
58
+    protected $optionData = [ ];
59 59
 
60 60
     /**
61 61
      * @return string
62 62
      */
63 63
     protected function getDestinationFilePath(): string
64 64
     {
65
-        return $this->getModule()->getPath() . $this->filePath . '/' . $this->getFileName();
65
+        return $this->getModule()->getPath().$this->filePath.'/'.$this->getFileName();
66 66
     }
67 67
 
68 68
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $this->beforeGeneration();
84 84
 
85 85
         if ($this->event === null)
86
-            throw new Exception("No Generator event specified on " . static::class);
86
+            throw new Exception("No Generator event specified on ".static::class);
87 87
 
88 88
         event(new $this->event($path, $stub));
89 89
         $this->info("Created : {$path}");
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     protected function getFileName()
98 98
     {
99
-        return $this->getClassName() . '.php';
99
+        return $this->getClassName().'.php';
100 100
     }
101 101
 
102 102
     protected function isOverwriteable() :bool
@@ -108,21 +108,21 @@  discard block
 block discarded – undo
108 108
 
109 109
     protected function getModule(): Module
110 110
     {
111
-        return once(function () {
111
+        return once(function() {
112 112
             return Larapi::getModule($this->getModuleName());
113 113
         });
114 114
     }
115 115
 
116 116
     protected function getModuleName(): string
117 117
     {
118
-        return once(function () {
118
+        return once(function() {
119 119
             return Str::studly($this->askModuleName());
120 120
         });
121 121
     }
122 122
 
123 123
     private function askModuleName(): string
124 124
     {
125
-        $moduleName = $this->argument('module') ?? $this->anticipate('For what module would you like to generate a ' . $this->getGeneratorName() . '.', Larapi::getModuleNames());
125
+        $moduleName = $this->argument('module') ?? $this->anticipate('For what module would you like to generate a '.$this->getGeneratorName().'.', Larapi::getModuleNames());
126 126
 
127 127
         if ($moduleName === null) {
128 128
             $this->error('module not specified');
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      */
141 141
     public function getClassNamespace(): string
142 142
     {
143
-        return $this->getModule()->getNamespace() . str_replace('/', '\\', $this->filePath);
143
+        return $this->getModule()->getNamespace().str_replace('/', '\\', $this->filePath);
144 144
     }
145 145
 
146 146
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     final protected function getOptions()
170 170
     {
171 171
         $options = $this->setOptions();
172
-        $options[] = ['overwrite', null, InputOption::VALUE_NONE, 'Overwrite this file if it already exists?'];
172
+        $options[ ] = [ 'overwrite', null, InputOption::VALUE_NONE, 'Overwrite this file if it already exists?' ];
173 173
         return $options;
174 174
     }
175 175
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     final protected function getArguments()
182 182
     {
183 183
         return array_merge([
184
-            ['module', InputArgument::OPTIONAL, 'The name of module will be used.'],
184
+            [ 'module', InputArgument::OPTIONAL, 'The name of module will be used.' ],
185 185
         ],
186 186
             $this->setArguments());
187 187
     }
@@ -202,17 +202,17 @@  discard block
 block discarded – undo
202 202
 
203 203
     protected function getClassName(): string
204 204
     {
205
-        return once(function () {
205
+        return once(function() {
206 206
             return Str::studly($this->askClassName());
207 207
         });
208 208
     }
209 209
 
210 210
     private function askClassName(): string
211 211
     {
212
-        $className = $this->argument('name') ?? $this->ask('Specify the name of the ' . $this->getGeneratorName() . '.');
212
+        $className = $this->argument('name') ?? $this->ask('Specify the name of the '.$this->getGeneratorName().'.');
213 213
 
214 214
         if ($className === null) {
215
-            throw new \Exception('Name of ' . $this->getGeneratorName() . ' not set.');
215
+            throw new \Exception('Name of '.$this->getGeneratorName().' not set.');
216 216
         }
217 217
 
218 218
         return $className;
@@ -235,19 +235,19 @@  discard block
 block discarded – undo
235 235
     protected function handleOptions()
236 236
     {
237 237
         foreach ($this->getOptions() as $option) {
238
-            $method = 'handle' . ucfirst(strtolower($option[0])) . 'Option';
238
+            $method = 'handle'.ucfirst(strtolower($option[ 0 ])).'Option';
239 239
             $originalInput = $this->getOriginalOptionInput();
240
-            if (isset($originalInput[$option[0]])) {
241
-                $this->optionData[$option[0]] = $originalInput[$option[0]];
240
+            if (isset($originalInput[ $option[ 0 ] ])) {
241
+                $this->optionData[ $option[ 0 ] ] = $originalInput[ $option[ 0 ] ];
242 242
             } else {
243
-                $this->optionData[$option[0]] = method_exists($this, $method) ? $this->$method($option[1], $option[2], $option[3], $option[4]) : $this->option($option[0]);
243
+                $this->optionData[ $option[ 0 ] ] = method_exists($this, $method) ? $this->$method($option[ 1 ], $option[ 2 ], $option[ 3 ], $option[ 4 ]) : $this->option($option[ 0 ]);
244 244
             }
245 245
         }
246 246
     }
247 247
 
248 248
     protected function getOption(string $name)
249 249
     {
250
-        return $this->optionData[$name];
250
+        return $this->optionData[ $name ];
251 251
     }
252 252
 
253 253
     private function buildInputOption($key, $shortcut, $type, $question, $default)
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
         } elseif ($type === InputOption::VALUE_OPTIONAL || $type === InputOption::VALUE_IS_BOOL) {
260 260
             if ($type !== InputOption::VALUE_IS_BOOL && ($input = $this->option($key)) !== null) {
261 261
                 if (is_bool($default))
262
-                    return (bool)$input;
262
+                    return (bool) $input;
263 263
                 return $input;
264 264
             } else {
265 265
                 if ($this->isShortcutBool($shortcut))
@@ -285,13 +285,13 @@  discard block
 block discarded – undo
285 285
 
286 286
     private function isShortcutBool($shortcut)
287 287
     {
288
-        return is_bool($shortcut) || (is_array($shortcut) && is_bool($shortcut[0]));
288
+        return is_bool($shortcut) || (is_array($shortcut) && is_bool($shortcut[ 0 ]));
289 289
     }
290 290
 
291 291
     public function __call($method, $parameters)
292 292
     {
293 293
         $key = str_replace('get', '', $method);
294 294
         if (array_key_exists(strtolower($method), $this->optionData))
295
-            return $this->optionData[$key];
295
+            return $this->optionData[ $key ];
296 296
     }
297 297
 }
Please login to merge, or discard this patch.
src/Foundation/Tests/ModuleGeneratorTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $pipeline = $this->generator->getPipeline();
54 54
 
55 55
         $this->assertIsArray($pipeline);
56
-        $this->assertEquals('Controller', $pipeline[0]['name']);
56
+        $this->assertEquals('Controller', $pipeline[ 0 ][ 'name' ]);
57 57
     }
58 58
 
59 59
     public function testModuleGeneration()
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
 
63 63
         $this->generator->addController($controller = 'AController');
64 64
 
65
-        $this->generator->addTest($serviceTest = 'AServiceTest', $serviceType ='service');
66
-        $this->generator->addTest($httpTest = 'AHttpTest', $httpType ='http');
67
-        $this->generator->addTest($unitTest = 'AUnitTest', $unitType ='unit');
65
+        $this->generator->addTest($serviceTest = 'AServiceTest', $serviceType = 'service');
66
+        $this->generator->addTest($httpTest = 'AHttpTest', $httpType = 'http');
67
+        $this->generator->addTest($unitTest = 'AUnitTest', $unitType = 'unit');
68 68
 
69 69
         $this->generator->addCommand($command = 'ACommand', $commandName = 'command:dosomething');
70 70
 
Please login to merge, or discard this patch.
src/Foundation/Tests/FileGeneratorTest.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     }
48 48
 
49 49
     protected function getModuleGenerator(string $moduleName) :GeneratorManager{
50
-       return GeneratorManager::module($moduleName,true);
50
+       return GeneratorManager::module($moduleName, true);
51 51
     }
52 52
 
53 53
     public function testCreateSqlMigration()
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
     public function testCreateFactory()
85 85
     {
86 86
         $moduleName = "User";
87
-        $this->getModuleGenerator($moduleName)->createFactory( "User");
87
+        $this->getModuleGenerator($moduleName)->createFactory("User");
88 88
 
89
-        $expectedFileName = Larapi::getModule($moduleName)->getFactories()->getPath() . '/UserFactory.php';
89
+        $expectedFileName = Larapi::getModule($moduleName)->getFactories()->getPath().'/UserFactory.php';
90 90
         $expectedStubName = "factory.stub";
91 91
         $expectedStubOptions = [
92 92
             'CLASS' => 'UserFactory',
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
     public function testCreateController()
107 107
     {
108 108
         $moduleName = "User";
109
-        $this->getModuleGenerator($moduleName)->createController( "UserController");
109
+        $this->getModuleGenerator($moduleName)->createController("UserController");
110 110
 
111
-        $expectedFileName = Larapi::getModule($moduleName)->getControllers()->getPath() . '/UserController.php';
111
+        $expectedFileName = Larapi::getModule($moduleName)->getControllers()->getPath().'/UserController.php';
112 112
         $expectedStubName = "controller.stub";
113 113
         $expectedStubOptions = [
114 114
             'CLASS' => 'UserController',
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $moduleName = "User";
130 130
         $this->getModuleGenerator($moduleName)->createListener("SendWelcomeMail", "UserRegisteredEvent");
131 131
 
132
-        $expectedFileName = Larapi::getModule($moduleName)->getListeners()->getPath() . '/SendWelcomeMail.php';
132
+        $expectedFileName = Larapi::getModule($moduleName)->getListeners()->getPath().'/SendWelcomeMail.php';
133 133
         $expectedStubName = "listener.stub";
134 134
         $expectedStubOptions = [
135 135
             'CLASS' => 'SendWelcomeMail',
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $fileName = "RandomUserJob";
164 164
         $this->getModuleGenerator($moduleName)->createJob($fileName, false);
165 165
 
166
-        $expectedFileName = Larapi::getModule($moduleName)->getJobs()->getPath() . "/$fileName.php";
166
+        $expectedFileName = Larapi::getModule($moduleName)->getJobs()->getPath()."/$fileName.php";
167 167
         $expectedStubName = "job-queued.stub";
168 168
         $expectedStubOptions = [
169 169
             'NAMESPACE' => 'Modules\User\Jobs',
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     public function testCreateSynchronousJob()
183 183
     {
184 184
         $moduleName = "User";
185
-        $this->getModuleGenerator($moduleName)->createJob( "AJob", true);
185
+        $this->getModuleGenerator($moduleName)->createJob("AJob", true);
186 186
         $event = $this->getFirstDispatchedEvent(JobGeneratedEvent::class);
187 187
 
188 188
         $this->assertNotNull($event);
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
         $this->getModuleGenerator($moduleName)->createCommand($fileName, $commandName);
199 199
 
200
-        $expectedFileName = Larapi::getModule($moduleName)->getCommands()->getPath() . "/$fileName.php";
200
+        $expectedFileName = Larapi::getModule($moduleName)->getCommands()->getPath()."/$fileName.php";
201 201
         $expectedStubName = "command.stub";
202 202
         $expectedStubOptions = [
203 203
             'NAMESPACE' => 'Modules\User\Console',
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         $this->assertEquals($expectedStubName, $event->getStub()->getName());
215 215
         $this->assertEquals($expectedStubOptions, $event->getStub()->getOptions());
216 216
 
217
-        $this->assertEquals($commandName,$event->getConsoleCommand());
217
+        $this->assertEquals($commandName, $event->getConsoleCommand());
218 218
         //$this->assertEquals($expectedStubOptions, $event->getStub()->getOptions());
219 219
     }
220 220
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
         $this->getModuleGenerator($moduleName)->createMiddleware($fileName);
227 227
 
228
-        $expectedFileName = Larapi::getModule($moduleName)->getMiddleWare()->getPath() . "/$fileName.php";
228
+        $expectedFileName = Larapi::getModule($moduleName)->getMiddleWare()->getPath()."/$fileName.php";
229 229
         $expectedStubName = "middleware.stub";
230 230
         $expectedStubOptions = [
231 231
             'CLASS' => 'RandomMiddleware',
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
         $this->getModuleGenerator($moduleName)->createServiceProvider($fileName);
250 250
 
251
-        $expectedFileName = Larapi::getModule($moduleName)->getServiceProviders()->getPath() . "/$fileName.php";
251
+        $expectedFileName = Larapi::getModule($moduleName)->getServiceProviders()->getPath()."/$fileName.php";
252 252
         $expectedStubName = "provider.stub";
253 253
         $expectedStubOptions = [
254 254
             'NAMESPACE' => 'Modules\User\Providers',
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
         $this->getModuleGenerator($moduleName)->createNotification($fileName);
273 273
 
274
-        $expectedFileName = Larapi::getModule($moduleName)->getNotifications()->getPath() . "/$fileName.php";
274
+        $expectedFileName = Larapi::getModule($moduleName)->getNotifications()->getPath()."/$fileName.php";
275 275
         $expectedStubName = "notification.stub";
276 276
         $expectedStubOptions = [
277 277
             'NAMESPACE' => 'Modules\User\Notifications',
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 
295 295
         $this->getModuleGenerator($moduleName)->createModel($fileName, false, true);
296 296
 
297
-        $expectedFileName = Larapi::getModule($moduleName)->getModels()->getPath() . "/$moduleName$fileName.php";
297
+        $expectedFileName = Larapi::getModule($moduleName)->getModels()->getPath()."/$moduleName$fileName.php";
298 298
         $expectedStubName = "model.stub";
299 299
         $expectedStubOptions = [
300 300
             'NAMESPACE' => 'Modules\User\Entities',
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 
330 330
         $this->getModuleGenerator($moduleName)->createPolicy($fileName);
331 331
 
332
-        $expectedFileName = Larapi::getModule($moduleName)->getPolicies()->getPath() . "/$fileName.php";
332
+        $expectedFileName = Larapi::getModule($moduleName)->getPolicies()->getPath()."/$fileName.php";
333 333
         $expectedStubName = "policy.stub";
334 334
         $expectedStubOptions = [
335 335
             'NAMESPACE' => 'Modules\User\Policies',
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 
353 353
         $this->getModuleGenerator($moduleName)->createTransformer($fileName, $model);
354 354
 
355
-        $expectedFileName = Larapi::getModule($moduleName)->getTransformers()->getPath() . "/$fileName.php";
355
+        $expectedFileName = Larapi::getModule($moduleName)->getTransformers()->getPath()."/$fileName.php";
356 356
         $expectedStubName = "transformer.stub";
357 357
         $expectedStubOptions = [
358 358
             'NAMESPACE' => 'Modules\User\Transformers',
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 
377 377
         $this->getModuleGenerator($moduleName)->createTest($fileName, 'unit');
378 378
 
379
-        $expectedFileName = Larapi::getModule($moduleName)->getTests()->getPath() . "/$fileName.php";
379
+        $expectedFileName = Larapi::getModule($moduleName)->getTests()->getPath()."/$fileName.php";
380 380
         $expectedStubName = "unit-test.stub";
381 381
         $expectedStubOptions = [
382 382
             'NAMESPACE' => 'Modules\User\Tests',
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 
400 400
         $this->getModuleGenerator($moduleName)->createRequest($fileName);
401 401
 
402
-        $expectedFileName = Larapi::getModule($moduleName)->getRequests()->getPath() . "/$fileName.php";
402
+        $expectedFileName = Larapi::getModule($moduleName)->getRequests()->getPath()."/$fileName.php";
403 403
         $expectedStubName = "request.stub";
404 404
         $expectedStubOptions = [
405 405
             'NAMESPACE' => 'Modules\User\Http\Requests',
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 
422 422
         $this->getModuleGenerator($moduleName)->createRule($fileName);
423 423
 
424
-        $expectedFileName = Larapi::getModule($moduleName)->getRules()->getPath() . "/$fileName.php";
424
+        $expectedFileName = Larapi::getModule($moduleName)->getRules()->getPath()."/$fileName.php";
425 425
         $expectedStubName = "rule.stub";
426 426
         $expectedStubOptions = [
427 427
             'NAMESPACE' => 'Modules\User\Rules',
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 
444 444
         $this->getModuleGenerator($moduleName)->createSeeder($fileName);
445 445
 
446
-        $expectedFileName = Larapi::getModule($moduleName)->getSeeders()->getPath() . "/$fileName.php";
446
+        $expectedFileName = Larapi::getModule($moduleName)->getSeeders()->getPath()."/$fileName.php";
447 447
         $expectedStubName = "seeder.stub";
448 448
         $expectedStubOptions = [
449 449
             'NAMESPACE' => 'Modules\User\Database\Seeders',
@@ -461,11 +461,11 @@  discard block
 block discarded – undo
461 461
     public function testCreateRoute()
462 462
     {
463 463
         $moduleName = "Demo";
464
-        $routename = strtolower(Str::plural($moduleName)) . '.v1';
464
+        $routename = strtolower(Str::plural($moduleName)).'.v1';
465 465
 
466 466
         $this->getModuleGenerator($moduleName)->createRoute();
467 467
 
468
-        $expectedFileName = Larapi::getModule($moduleName)->getRoutes()->getPath() . "/$routename.php";
468
+        $expectedFileName = Larapi::getModule($moduleName)->getRoutes()->getPath()."/$routename.php";
469 469
         $expectedStubName = "route.stub";
470 470
         $expectedStubOptions = [
471 471
             'MODULE_NAME' => 'Demo',
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 
488 488
         $this->getModuleGenerator($moduleName)->createComposer();
489 489
 
490
-        $expectedFileName = Larapi::getModule($moduleName)->getPath() . "/composer.json";
490
+        $expectedFileName = Larapi::getModule($moduleName)->getPath()."/composer.json";
491 491
         $expectedStubName = "composer.stub";
492 492
         $expectedStubOptions = [
493 493
             'LOWER_MODULE_NAME' => 'demo',
Please login to merge, or discard this patch.