@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | continue; |
332 | 332 | } |
333 | 333 | |
334 | - $path = $this->module->getModulePath($this->getName()) . '/' . $folder->getPath(); |
|
334 | + $path = $this->module->getModulePath($this->getName()).'/'.$folder->getPath(); |
|
335 | 335 | |
336 | 336 | $this->filesystem->makeDirectory($path, 0755, true); |
337 | 337 | if (config('modules.stubs.gitkeep')) { |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | */ |
348 | 348 | public function generateGitKeep($path) |
349 | 349 | { |
350 | - $this->filesystem->put($path . '/.gitkeep', ''); |
|
350 | + $this->filesystem->put($path.'/.gitkeep', ''); |
|
351 | 351 | } |
352 | 352 | |
353 | 353 | /** |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | public function generateFiles() |
357 | 357 | { |
358 | 358 | foreach ($this->getFiles() as $stub => $file) { |
359 | - $path = $this->module->getModulePath($this->getName()) . $file; |
|
359 | + $path = $this->module->getModulePath($this->getName()).$file; |
|
360 | 360 | |
361 | 361 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
362 | 362 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | |
384 | 384 | if (GenerateConfigReader::read('provider')->generate() === true) { |
385 | 385 | $this->console->call('module:make-provider', [ |
386 | - 'name' => $this->getName() . 'ServiceProvider', |
|
386 | + 'name' => $this->getName().'ServiceProvider', |
|
387 | 387 | 'module' => $this->getName(), |
388 | 388 | '--master' => true, |
389 | 389 | ]); |
@@ -393,11 +393,11 @@ discard block |
||
393 | 393 | } |
394 | 394 | |
395 | 395 | if (GenerateConfigReader::read('controller')->generate() === true) { |
396 | - $options = $this->type=='api'?['--api'=>true]:[]; |
|
396 | + $options = $this->type == 'api' ? ['--api'=>true] : []; |
|
397 | 397 | $this->console->call('module:make-controller', [ |
398 | - 'controller' => $this->getName() . 'Controller', |
|
398 | + 'controller' => $this->getName().'Controller', |
|
399 | 399 | 'module' => $this->getName(), |
400 | - ]+$options); |
|
400 | + ] + $options); |
|
401 | 401 | } |
402 | 402 | } |
403 | 403 | |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | protected function getStubContents($stub) |
412 | 412 | { |
413 | 413 | return (new Stub( |
414 | - '/' . $stub . '.stub', |
|
414 | + '/'.$stub.'.stub', |
|
415 | 415 | $this->getReplacement($stub) |
416 | 416 | ) |
417 | 417 | )->render(); |
@@ -459,10 +459,10 @@ discard block |
||
459 | 459 | } |
460 | 460 | |
461 | 461 | foreach ($keys as $key) { |
462 | - if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) { |
|
462 | + if (method_exists($this, $method = 'get'.ucfirst(Str::studly(strtolower($key))).'Replacement')) { |
|
463 | 463 | $replaces[$key] = $this->$method(); |
464 | 464 | } else { |
465 | - switch($key) { |
|
465 | + switch ($key) { |
|
466 | 466 | case 'STUDLY_NAME_WITH_BACKSLASHES': |
467 | 467 | $replaces[$key] = $this->getStudlyNameReplacement(true); |
468 | 468 | break; |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | */ |
489 | 489 | private function generateModuleJsonFile() |
490 | 490 | { |
491 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
491 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
492 | 492 | |
493 | 493 | if (!$this->filesystem->isDirectory($dir = dirname($path))) { |
494 | 494 | $this->filesystem->makeDirectory($dir, 0775, true); |
@@ -505,13 +505,13 @@ discard block |
||
505 | 505 | */ |
506 | 506 | private function cleanModuleJsonFile() |
507 | 507 | { |
508 | - $path = $this->module->getModulePath($this->getName()) . 'module.json'; |
|
508 | + $path = $this->module->getModulePath($this->getName()).'module.json'; |
|
509 | 509 | |
510 | 510 | $content = $this->filesystem->get($path); |
511 | 511 | $namespace = $this->getModuleNamespaceReplacement(); |
512 | 512 | $studlyName = $this->getStudlyNameReplacement(true); |
513 | 513 | |
514 | - $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"'; |
|
514 | + $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"'; |
|
515 | 515 | $provider = str_replace('\\\\\\\\', '\\\\', $provider); |
516 | 516 | |
517 | 517 | $content = str_replace($provider, '', $content); |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | * |
535 | 535 | * @return string |
536 | 536 | */ |
537 | - protected function getStudlyNameReplacement($slashToBackslash=false) |
|
537 | + protected function getStudlyNameReplacement($slashToBackslash = false) |
|
538 | 538 | { |
539 | 539 | if (!$slashToBackslash) { |
540 | 540 | return $this->getName(); |
@@ -87,15 +87,15 @@ |
||
87 | 87 | { |
88 | 88 | $extra = str_replace($this->getClass(), '', $this->argument($this->argumentName)); |
89 | 89 | |
90 | - $extra = substr($module->getStudlyName(),0, strlen($extra)+1) ? '' : str_replace('/', '\\', $extra); |
|
90 | + $extra = substr($module->getStudlyName(), 0, strlen($extra) + 1) ? '' : str_replace('/', '\\', $extra); |
|
91 | 91 | |
92 | 92 | $namespace = $this->laravel['modules']->config('namespace'); |
93 | 93 | |
94 | - $namespace .= '\\' . $module->getStudlyName(); |
|
94 | + $namespace .= '\\'.$module->getStudlyName(); |
|
95 | 95 | |
96 | - $namespace .= '\\' . $this->getDefaultNamespace(); |
|
96 | + $namespace .= '\\'.$this->getDefaultNamespace(); |
|
97 | 97 | |
98 | - $namespace .= '\\' . $extra; |
|
98 | + $namespace .= '\\'.$extra; |
|
99 | 99 | |
100 | 100 | $namespace = str_replace('/', '\\', $namespace); |
101 | 101 |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | $factoryPath = GenerateConfigReader::read('factory'); |
71 | 71 | |
72 | - return $path . $factoryPath->getPath() . '/' . $this->getFileName(); |
|
72 | + return $path.$factoryPath->getPath().'/'.$this->getFileName(); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | private function getFileName() |
79 | 79 | { |
80 | - return basename(Str::studly($this->argument('name')) . 'Factory.php'); |
|
80 | + return basename(Str::studly($this->argument('name')).'Factory.php'); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | public function getModelNamespace(): string |
109 | 109 | { |
110 | 110 | return str_replace('/', '\\', |
111 | - $this->laravel['modules']->config('namespace') . '\\' . $this->laravel['modules']->findOrFail($this->getModuleName()) . '\\' . $this->laravel['modules']->config('paths.generator.model.path', 'Entities') |
|
111 | + $this->laravel['modules']->config('namespace').'\\'.$this->laravel['modules']->findOrFail($this->getModuleName()).'\\'.$this->laravel['modules']->config('paths.generator.model.path', 'Entities') |
|
112 | 112 | ); |
113 | 113 | } |
114 | 114 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | $seederPath = GenerateConfigReader::read('seeder'); |
88 | 88 | |
89 | - return $path . $seederPath->getPath() . '/' . $this->getSeederName() . '.php'; |
|
89 | + return $path.$seederPath->getPath().'/'.$this->getSeederName().'.php'; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | { |
99 | 99 | $end = $this->option('master') ? 'DatabaseSeeder' : 'TableSeeder'; |
100 | 100 | |
101 | - return basename(Str::studly($this->argument('name')) . $end); |
|
101 | + return basename(Str::studly($this->argument('name')).$end); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | $generatorPath = GenerateConfigReader::read('migration'); |
118 | 118 | |
119 | - return $path . $generatorPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
119 | + return $path.$generatorPath->getPath().'/'.$this->getFileName().'.php'; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | private function getFileName() |
126 | 126 | { |
127 | - return basename(date('Y_m_d_His_') . $this->getSchemaName()); |
|
127 | + return basename(date('Y_m_d_His_').$this->getSchemaName()); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | protected function writeComponentViewTemplate() |
51 | 51 | { |
52 | - $this->call('module:make-component-view', ['name' => $this->argument('name') , 'module' => $this->argument('module')]); |
|
52 | + $this->call('module:make-component-view', ['name' => $this->argument('name'), 'module' => $this->argument('module')]); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | public function getDefaultNamespace() : string |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | 'NAMESPACE' => $this->getClassNamespace($module), |
83 | 83 | 'CLASS' => $this->getClass(), |
84 | 84 | 'LOWER_NAME' => $module->getLowerName(), |
85 | - 'COMPONENT_NAME' => 'components.' . Str::lower($this->argument('name')), |
|
85 | + 'COMPONENT_NAME' => 'components.'.Str::lower($this->argument('name')), |
|
86 | 86 | ]))->render(); |
87 | 87 | } |
88 | 88 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
95 | 95 | $factoryPath = GenerateConfigReader::read('component-class'); |
96 | 96 | |
97 | - return $path . $factoryPath->getPath() . '/' . $this->getFileName(); |
|
97 | + return $path.$factoryPath->getPath().'/'.$this->getFileName(); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -102,6 +102,6 @@ discard block |
||
102 | 102 | */ |
103 | 103 | private function getFileName() |
104 | 104 | { |
105 | - return basename(Str::studly($this->argument('name')) . '.php'); |
|
105 | + return basename(Str::studly($this->argument('name')).'.php'); |
|
106 | 106 | } |
107 | 107 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); |
64 | 64 | $factoryPath = GenerateConfigReader::read('component-view'); |
65 | 65 | |
66 | - return $path . $factoryPath->getPath() . '/' . $this->getFileName(); |
|
66 | + return $path.$factoryPath->getPath().'/'.$this->getFileName(); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | */ |
72 | 72 | private function getFileName() |
73 | 73 | { |
74 | - return basename(Str::lower($this->argument('name')) . '.blade.php'); |
|
74 | + return basename(Str::lower($this->argument('name')).'.blade.php'); |
|
75 | 75 | } |
76 | 76 | } |