@@ -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 | { |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | $factoryPath = GenerateConfigReader::read('factory'); |
| 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 Str::studly($this->argument('name')) . '.php'; |
|
| 74 | + return Str::studly($this->argument('name')).'.php'; |
|
| 75 | 75 | } |
| 76 | 76 | } |
@@ -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 | { |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | |
| 79 | 79 | $middlewarePath = GenerateConfigReader::read('filter'); |
| 80 | 80 | |
| 81 | - return $path . $middlewarePath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 81 | + return $path.$middlewarePath->getPath().'/'.$this->getFileName().'.php'; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -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 | { |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | |
| 77 | 77 | $policyPath = GenerateConfigReader::read('policies'); |
| 78 | 78 | |
| 79 | - return $path . $policyPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 79 | + return $path.$policyPath->getPath().'/'.$this->getFileName().'.php'; |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -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 | { |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
| 80 | 80 | |
| 81 | - return (new Stub('/' . $stub . '.stub', [ |
|
| 81 | + return (new Stub('/'.$stub.'.stub', [ |
|
| 82 | 82 | 'NAMESPACE' => $this->getClassNamespace($module), |
| 83 | 83 | 'CLASS' => $this->getClass(), |
| 84 | 84 | 'LOWER_NAME' => $module->getLowerName(), |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | $generatorPath = GenerateConfigReader::read('provider'); |
| 105 | 105 | |
| 106 | - return $path . $generatorPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 106 | + return $path.$generatorPath->getPath().'/'.$this->getFileName().'.php'; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
@@ -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 | { |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | |
| 79 | 79 | $requestPath = GenerateConfigReader::read('request'); |
| 80 | 80 | |
| 81 | - return $path . $requestPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 81 | + return $path.$requestPath->getPath().'/'.$this->getFileName().'.php'; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -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 | { |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | |
| 77 | 77 | $rulePath = GenerateConfigReader::read('rules'); |
| 78 | 78 | |
| 79 | - return $path . $rulePath->getPath() . '/' . $this->getFileName() . '.php'; |
|
| 79 | + return $path.$rulePath->getPath().'/'.$this->getFileName().'.php'; |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | /** |
| 68 | 68 | * @throws \InvalidArgumentException |
| 69 | 69 | * |
| 70 | - * @return mixed |
|
| 70 | + * @return Stub |
|
| 71 | 71 | */ |
| 72 | 72 | protected function getTemplateContents() |
| 73 | 73 | { |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | - * @return mixed |
|
| 110 | + * @return string |
|
| 111 | 111 | */ |
| 112 | 112 | protected function getDestinationFilePath() |
| 113 | 113 | { |
@@ -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 date('Y_m_d_His_') . $this->getSchemaName(); |
|
| 127 | + return date('Y_m_d_His_').$this->getSchemaName(); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | /** |
@@ -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 | { |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | $string = ''; |
| 55 | 55 | foreach ($pieces as $i => $piece) { |
| 56 | - if ($i+1 < count($pieces)) { |
|
| 57 | - $string .= strtolower($piece) . '_'; |
|
| 56 | + if ($i + 1 < count($pieces)) { |
|
| 57 | + $string .= strtolower($piece).'_'; |
|
| 58 | 58 | } else { |
| 59 | 59 | $string .= Str::plural(strtolower($piece)); |
| 60 | 60 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | private function handleOptionalMigrationOption() |
| 96 | 96 | { |
| 97 | 97 | if ($this->option('migration') === true) { |
| 98 | - $migrationName = 'create_' . $this->createMigrationName() . '_table'; |
|
| 98 | + $migrationName = 'create_'.$this->createMigrationName().'_table'; |
|
| 99 | 99 | $this->call('module:make-migration', ['name' => $migrationName, 'module' => $this->argument('module')]); |
| 100 | 100 | } |
| 101 | 101 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | $modelPath = GenerateConfigReader::read('model'); |
| 130 | 130 | |
| 131 | - return $path . $modelPath->getPath() . '/' . $this->getModelName() . '.php'; |
|
| 131 | + return $path.$modelPath->getPath().'/'.$this->getModelName().'.php'; |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | /** |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | { |
| 187 | 187 | $lowerName = $this->getLowerName(); |
| 188 | 188 | |
| 189 | - $langPath = $this->getPath() . '/Resources/lang'; |
|
| 189 | + $langPath = $this->getPath().'/Resources/lang'; |
|
| 190 | 190 | |
| 191 | 191 | if (is_dir($langPath)) { |
| 192 | 192 | $this->loadTranslationsFrom($langPath, $lowerName); |
@@ -206,8 +206,8 @@ discard block |
||
| 206 | 206 | $file = 'module.json'; |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - return array_get($this->moduleJson, $file, function () use ($file) { |
|
| 210 | - return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->app['files']); |
|
| 209 | + return array_get($this->moduleJson, $file, function() use ($file) { |
|
| 210 | + return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->app['files']); |
|
| 211 | 211 | }); |
| 212 | 212 | } |
| 213 | 213 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | */ |
| 259 | 259 | protected function fireEvent($event) |
| 260 | 260 | { |
| 261 | - $this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]); |
|
| 261 | + $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]); |
|
| 262 | 262 | } |
| 263 | 263 | /** |
| 264 | 264 | * Register the aliases from this module. |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | protected function registerFiles() |
| 284 | 284 | { |
| 285 | 285 | foreach ($this->get('files', []) as $file) { |
| 286 | - include $this->path . '/' . $file; |
|
| 286 | + include $this->path.'/'.$file; |
|
| 287 | 287 | } |
| 288 | 288 | } |
| 289 | 289 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | */ |
| 407 | 407 | public function getExtraPath(string $path) : string |
| 408 | 408 | { |
| 409 | - return $this->getPath() . '/' . $path; |
|
| 409 | + return $this->getPath().'/'.$path; |
|
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | /** |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | /** |
| 228 | 228 | * Get a specific data from composer.json file by given the key. |
| 229 | 229 | * |
| 230 | - * @param $key |
|
| 230 | + * @param string $key |
|
| 231 | 231 | * @param null $default |
| 232 | 232 | * |
| 233 | 233 | * @return mixed |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | /** |
| 301 | 301 | * Determine whether the given status same with the current module status. |
| 302 | 302 | * |
| 303 | - * @param $status |
|
| 303 | + * @param integer $status |
|
| 304 | 304 | * |
| 305 | 305 | * @return bool |
| 306 | 306 | */ |
@@ -354,9 +354,9 @@ discard block |
||
| 354 | 354 | /** |
| 355 | 355 | * Set active state for current module. |
| 356 | 356 | * |
| 357 | - * @param $active |
|
| 357 | + * @param integer $active |
|
| 358 | 358 | * |
| 359 | - * @return bool |
|
| 359 | + * @return integer |
|
| 360 | 360 | */ |
| 361 | 361 | public function setActive($active) |
| 362 | 362 | { |