| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 5 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 13 | class EnumServiceProvider extends ServiceProvider |
||
| 14 | 132 | { |
|
| 15 | 132 | public function boot(): void |
|
| 16 | { |
||
| 17 | 132 | if ($this->app->runningInConsole()) { |
|
| 18 | $this->publishes([ |
||
| 19 | __DIR__.'/../resources/lang' => resource_path('lang/vendor/enum'), |
||
| 20 | ], 'translation'); |
||
| 21 | } |
||
| 22 | |||
| 23 | $this->loadTranslationsFrom(__DIR__.'/../resources/lang/', 'enum'); |
||
| 24 | |||
| 25 | $this->bootValidationRules(); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function register(): void |
||
| 29 | { |
||
| 30 | $this->app->bind('command.make:enum', MakeEnum::class); |
||
| 31 | |||
| 32 | $this->commands([ |
||
| 33 | 'command.make:enum', |
||
| 34 | ]); |
||
| 35 | |||
| 36 | $this->registerRequestTransformMacro(); |
||
| 37 | } |
||
| 38 | |||
| 39 | protected function registerRequestTransformMacro(): void |
||
| 40 | { |
||
| 41 | Request::mixin(new EnumRequest); |
||
| 42 | } |
||
| 43 | |||
| 44 | public function bootValidationRules(): void |
||
| 50 | }); |
||
| 51 | } |
||
| 52 | } |
||
| 53 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.