@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | protected function getArguments() |
| 68 | 68 | { |
| 69 | 69 | return [ |
| 70 | - ['name', InputArgument::REQUIRED, 'The name of the service'], |
|
| 70 | + [ 'name', InputArgument::REQUIRED, 'The name of the service' ], |
|
| 71 | 71 | ]; |
| 72 | 72 | } |
| 73 | 73 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | protected function getOptions() |
| 80 | 80 | { |
| 81 | 81 | return [ |
| 82 | - ['static', 's', InputOption::VALUE_NONE, 'Generate a static service.'], |
|
| 82 | + [ 'static', 's', InputOption::VALUE_NONE, 'Generate a static service.' ], |
|
| 83 | 83 | ]; |
| 84 | 84 | } |
| 85 | 85 | } |
@@ -50,23 +50,23 @@ |
||
| 50 | 50 | |
| 51 | 51 | $appConfig = file_get_contents(config_path('app.php')); |
| 52 | 52 | |
| 53 | - if (Str::contains($appConfig, $namespace . '\\Providers\\' . self::PROVIDER_NAME . '::class')) { |
|
| 53 | + if (Str::contains($appConfig, $namespace.'\\Providers\\'.self::PROVIDER_NAME.'::class')) { |
|
| 54 | 54 | return; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - if (!file_exists(app_path('Providers/' . self::PROVIDER_NAME . '.php'))) { |
|
| 58 | - throw new \Exception(self::PROVIDER_NAME . ' not published.'); |
|
| 57 | + if ( ! file_exists(app_path('Providers/'.self::PROVIDER_NAME.'.php'))) { |
|
| 58 | + throw new \Exception(self::PROVIDER_NAME.' not published.'); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - file_put_contents(app_path('Providers/' . self::PROVIDER_NAME . '.php'), str_replace( |
|
| 61 | + file_put_contents(app_path('Providers/'.self::PROVIDER_NAME.'.php'), str_replace( |
|
| 62 | 62 | "namespace App\Providers;", |
| 63 | 63 | "namespace {$namespace}\Providers;", |
| 64 | - file_get_contents(app_path('Providers/' . self::PROVIDER_NAME . '.php')) |
|
| 64 | + file_get_contents(app_path('Providers/'.self::PROVIDER_NAME.'.php')) |
|
| 65 | 65 | )); |
| 66 | 66 | |
| 67 | 67 | file_put_contents(config_path('app.php'), str_replace( |
| 68 | 68 | "{$namespace}\\Providers\EventServiceProvider::class,".PHP_EOL, |
| 69 | - "{$namespace}\\Providers\EventServiceProvider::class,".PHP_EOL." {$namespace}\Providers\\" . self::PROVIDER_NAME . "::class,".PHP_EOL, |
|
| 69 | + "{$namespace}\\Providers\EventServiceProvider::class,".PHP_EOL." {$namespace}\Providers\\".self::PROVIDER_NAME."::class,".PHP_EOL, |
|
| 70 | 70 | $appConfig |
| 71 | 71 | )); |
| 72 | 72 | } |