1 | <?php |
||
10 | class LodashServiceProvider extends ServiceProvider |
||
11 | { |
||
12 | protected $commands = [ |
||
13 | 'command.lodash.clear-all' => \Longman\LaravelLodash\Commands\ClearAll::class, |
||
14 | 'command.lodash.db.clear' => \Longman\LaravelLodash\Commands\DbClear::class, |
||
15 | 'command.lodash.db.dump' => \Longman\LaravelLodash\Commands\DbDump::class, |
||
16 | 'command.lodash.db.restore' => \Longman\LaravelLodash\Commands\DbRestore::class, |
||
17 | 'command.lodash.log.clear' => \Longman\LaravelLodash\Commands\LogClear::class, |
||
18 | 'command.lodash.user.add' => \Longman\LaravelLodash\Commands\UserAdd::class, |
||
19 | 'command.lodash.user.password' => \Longman\LaravelLodash\Commands\UserPassword::class, |
||
20 | ]; |
||
21 | |||
22 | 15 | public function boot(): void |
|
23 | { |
||
24 | 15 | $this->publishes([ |
|
25 | 15 | __DIR__ . '/../config/config.php' => config_path('lodash.php'), |
|
26 | ]); |
||
27 | |||
28 | 15 | $this->registerBladeDirectives(); |
|
29 | |||
30 | 15 | $this->loadTranslations(); |
|
31 | 15 | } |
|
32 | |||
33 | 15 | public function register(): void |
|
34 | { |
||
35 | 15 | $this->registerCommands(); |
|
36 | |||
37 | 15 | $this->registerRequestMacros(); |
|
38 | 15 | } |
|
39 | |||
40 | 15 | protected function registerCommands(): void |
|
48 | |||
49 | 15 | protected function registerBladeDirectives(): void |
|
50 | { |
||
67 | |||
68 | 15 | protected function registerRequestMacros(): void |
|
90 | |||
91 | 15 | protected function loadTranslations(): void |
|
99 | } |
||
100 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.