| @@ -59,7 +59,7 @@ discard block | ||
| 59 | 59 | } | 
| 60 | 60 | |
| 61 | 61 | /** | 
| 62 | - * @return mixed | |
| 62 | + * @return string | |
| 63 | 63 | */ | 
| 64 | 64 | protected function getTemplateContents() | 
| 65 | 65 |      { | 
| @@ -73,7 +73,7 @@ discard block | ||
| 73 | 73 | } | 
| 74 | 74 | |
| 75 | 75 | /** | 
| 76 | - * @return mixed | |
| 76 | + * @return string | |
| 77 | 77 | */ | 
| 78 | 78 | protected function getDestinationFilePath() | 
| 79 | 79 |      { | 
| @@ -81,7 +81,7 @@ | ||
| 81 | 81 | |
| 82 | 82 |          $seederPath = $this->laravel['modules']->config('paths.generator.command'); | 
| 83 | 83 | |
| 84 | - return $path . $seederPath . '/' . $this->getFileName() . '.php'; | |
| 84 | + return $path.$seederPath.'/'.$this->getFileName().'.php'; | |
| 85 | 85 | } | 
| 86 | 86 | |
| 87 | 87 | /** | 
| @@ -59,7 +59,7 @@ discard block | ||
| 59 | 59 | } | 
| 60 | 60 | |
| 61 | 61 | /** | 
| 62 | - * @return mixed | |
| 62 | + * @return string | |
| 63 | 63 | */ | 
| 64 | 64 | protected function getTemplateContents() | 
| 65 | 65 |      { | 
| @@ -78,7 +78,7 @@ discard block | ||
| 78 | 78 | } | 
| 79 | 79 | |
| 80 | 80 | /** | 
| 81 | - * @return mixed | |
| 81 | + * @return string | |
| 82 | 82 | */ | 
| 83 | 83 | protected function getDestinationFilePath() | 
| 84 | 84 |      { | 
| @@ -90,7 +90,7 @@ discard block | ||
| 90 | 90 | } | 
| 91 | 91 | |
| 92 | 92 | /** | 
| 93 | - * @return mixed|string | |
| 93 | + * @return string | |
| 94 | 94 | */ | 
| 95 | 95 | private function getModelName() | 
| 96 | 96 |      { | 
| @@ -52,8 +52,8 @@ discard block | ||
| 52 | 52 | |
| 53 | 53 | $string = ''; | 
| 54 | 54 |          foreach ($pieces as $i => $piece) { | 
| 55 | -            if ($i+1 < count($pieces)) { | |
| 56 | - $string .= strtolower($piece) . '_'; | |
| 55 | +            if ($i + 1 < count($pieces)) { | |
| 56 | + $string .= strtolower($piece).'_'; | |
| 57 | 57 |              } else { | 
| 58 | 58 | $string .= Str::plural(strtolower($piece)); | 
| 59 | 59 | } | 
| @@ -94,7 +94,7 @@ discard block | ||
| 94 | 94 | private function handleOptionalMigrationOption() | 
| 95 | 95 |      { | 
| 96 | 96 |          if ($this->option('migration') === true) { | 
| 97 | - $migrationName = 'create_' . $this->createMigrationName() . '_table'; | |
| 97 | + $migrationName = 'create_'.$this->createMigrationName().'_table'; | |
| 98 | 98 |              $this->call('module:make-migration', ['name' => $migrationName, 'module' => $this->argument('module')]); | 
| 99 | 99 | } | 
| 100 | 100 | } | 
| @@ -127,7 +127,7 @@ discard block | ||
| 127 | 127 | |
| 128 | 128 |          $seederPath = $this->laravel['modules']->config('paths.generator.model'); | 
| 129 | 129 | |
| 130 | - return $path . $seederPath . '/' . $this->getModelName() . '.php'; | |
| 130 | + return $path.$seederPath.'/'.$this->getModelName().'.php'; | |
| 131 | 131 | } | 
| 132 | 132 | |
| 133 | 133 | /** | 
| @@ -88,7 +88,7 @@ | ||
| 88 | 88 | /** | 
| 89 | 89 | * Get module instance. | 
| 90 | 90 | * | 
| 91 | - * @return \Nwidart\Modules\Module | |
| 91 | + * @return string | |
| 92 | 92 | */ | 
| 93 | 93 | public function getModule() | 
| 94 | 94 |      { | 
| @@ -24,7 +24,7 @@ | ||
| 24 | 24 | */ | 
| 25 | 25 | public function toArray() | 
| 26 | 26 |      { | 
| 27 | -        return array_map(function ($value) { | |
| 27 | +        return array_map(function($value) { | |
| 28 | 28 |              if ($value instanceof Module) { | 
| 29 | 29 | return $value->json()->getAttributes(); | 
| 30 | 30 | } | 
| @@ -67,7 +67,7 @@ discard block | ||
| 67 | 67 | |
| 68 | 68 | $module = $this->laravel['modules']->findOrFail($this->getModuleName()); | 
| 69 | 69 | |
| 70 | -        return (new Stub('/' . $stub . '.stub', [ | |
| 70 | +        return (new Stub('/'.$stub.'.stub', [ | |
| 71 | 71 | 'NAMESPACE' => $this->getClassNamespace($module), | 
| 72 | 72 | 'CLASS' => $this->getClass(), | 
| 73 | 73 | 'LOWER_NAME' => $module->getLowerName(), | 
| @@ -90,7 +90,7 @@ discard block | ||
| 90 | 90 | |
| 91 | 91 |          $generatorPath = $this->laravel['modules']->config('paths.generator.provider'); | 
| 92 | 92 | |
| 93 | - return $path . $generatorPath . '/' . $this->getFileName() . '.php'; | |
| 93 | + return $path.$generatorPath.'/'.$this->getFileName().'.php'; | |
| 94 | 94 | } | 
| 95 | 95 | |
| 96 | 96 | /** | 
| @@ -59,7 +59,7 @@ discard block | ||
| 59 | 59 | } | 
| 60 | 60 | |
| 61 | 61 | /** | 
| 62 | - * @return mixed | |
| 62 | + * @return string | |
| 63 | 63 | */ | 
| 64 | 64 | protected function getTemplateContents() | 
| 65 | 65 |      { | 
| @@ -73,7 +73,7 @@ discard block | ||
| 73 | 73 | } | 
| 74 | 74 | |
| 75 | 75 | /** | 
| 76 | - * @return mixed | |
| 76 | + * @return string | |
| 77 | 77 | */ | 
| 78 | 78 | protected function getDestinationFilePath() | 
| 79 | 79 |      { | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | "EVENTNAME" => $this->getEventName($module), | 
| 63 | 63 |              "EVENTSHORTENEDNAME" => $this->option('event'), | 
| 64 | 64 | "CLASS" => $this->getClass(), | 
| 65 | - 'DUMMYNAMESPACE' => $this->laravel->getNamespace() . "Events", | |
| 65 | + 'DUMMYNAMESPACE' => $this->laravel->getNamespace()."Events", | |
| 66 | 66 | ]))->render(); | 
| 67 | 67 | } | 
| 68 | 68 | |
| @@ -72,7 +72,7 @@ discard block | ||
| 72 | 72 | |
| 73 | 73 |          $seederPath = $this->laravel['modules']->config('paths.generator.listener'); | 
| 74 | 74 | |
| 75 | - return $path . $seederPath . '/' . $this->getFileName() . '.php'; | |
| 75 | + return $path.$seederPath.'/'.$this->getFileName().'.php'; | |
| 76 | 76 | } | 
| 77 | 77 | |
| 78 | 78 | /** | 
| @@ -94,13 +94,13 @@ discard block | ||
| 94 | 94 | |
| 95 | 95 | protected function getEventName(Module $module) | 
| 96 | 96 |      { | 
| 97 | -        return $this->getClassNamespace($module) . "\\" . config('modules.paths.generator.event') . "\\" . $this->option('event'); | |
| 97 | +        return $this->getClassNamespace($module)."\\".config('modules.paths.generator.event')."\\".$this->option('event'); | |
| 98 | 98 | } | 
| 99 | 99 | |
| 100 | 100 | private function getNamespace($module) | 
| 101 | 101 |      { | 
| 102 | 102 |          $namespace = str_replace('/', '\\', config('modules.paths.generator.listener')); | 
| 103 | 103 | |
| 104 | - return $this->getClassNamespace($module) . "\\" . $namespace; | |
| 104 | + return $this->getClassNamespace($module)."\\".$namespace; | |
| 105 | 105 | } | 
| 106 | 106 | } | 
| @@ -68,7 +68,7 @@ | ||
| 68 | 68 | |
| 69 | 69 |          $generatorPath = $this->laravel['modules']->config('paths.generator.provider'); | 
| 70 | 70 | |
| 71 | - return $path . $generatorPath . '/' . $this->getFileName() . '.php'; | |
| 71 | + return $path.$generatorPath.'/'.$this->getFileName().'.php'; | |
| 72 | 72 | } | 
| 73 | 73 | |
| 74 | 74 | /** | 
| @@ -72,7 +72,7 @@ | ||
| 72 | 72 | |
| 73 | 73 |          $seederPath = $this->laravel['modules']->config('paths.generator.request'); | 
| 74 | 74 | |
| 75 | - return $path . $seederPath . '/' . $this->getFileName() . '.php'; | |
| 75 | + return $path.$seederPath.'/'.$this->getFileName().'.php'; | |
| 76 | 76 | } | 
| 77 | 77 | |
| 78 | 78 | /** | 
| @@ -59,7 +59,7 @@ discard block | ||
| 59 | 59 | } | 
| 60 | 60 | |
| 61 | 61 | /** | 
| 62 | - * @return mixed | |
| 62 | + * @return string | |
| 63 | 63 | */ | 
| 64 | 64 | protected function getTemplateContents() | 
| 65 | 65 |      { | 
| @@ -73,7 +73,7 @@ discard block | ||
| 73 | 73 | } | 
| 74 | 74 | |
| 75 | 75 | /** | 
| 76 | - * @return mixed | |
| 76 | + * @return string | |
| 77 | 77 | */ | 
| 78 | 78 | protected function getDestinationFilePath() | 
| 79 | 79 |      { | 
| @@ -57,9 +57,9 @@ discard block | ||
| 57 | 57 | $module = $this->laravel['modules']->findOrFail($this->getModuleName()); | 
| 58 | 58 | |
| 59 | 59 |          return (new Stub('/event.stub', [ | 
| 60 | -            'NAMESPACE' => $this->getClassNamespace($module) . "\\" . config('modules.paths.generator.event'), | |
| 60 | +            'NAMESPACE' => $this->getClassNamespace($module)."\\".config('modules.paths.generator.event'), | |
| 61 | 61 | "CLASS" => $this->getClass(), | 
| 62 | - 'DUMMYNAMESPACE' => $this->laravel->getNamespace() . 'Events', | |
| 62 | + 'DUMMYNAMESPACE' => $this->laravel->getNamespace().'Events', | |
| 63 | 63 | ]))->render(); | 
| 64 | 64 | } | 
| 65 | 65 | |
| @@ -68,7 +68,7 @@ discard block | ||
| 68 | 68 | $path = $this->laravel['modules']->getModulePath($this->getModuleName()); | 
| 69 | 69 |          $seederPath = $this->laravel['modules']->config('paths.generator.event'); | 
| 70 | 70 | |
| 71 | - return $path . $seederPath . '/' . $this->getFileName() . '.php'; | |
| 71 | + return $path.$seederPath.'/'.$this->getFileName().'.php'; | |
| 72 | 72 | } | 
| 73 | 73 | |
| 74 | 74 | /** |