1 | <?php |
||
2 | namespace Sreedev\Slack; |
||
3 | |||
4 | use Illuminate\Support\ServiceProvider; |
||
5 | |||
6 | class SlackServiceProvider extends ServiceProvider |
||
7 | { |
||
8 | |||
9 | /** |
||
10 | * boot |
||
11 | * |
||
12 | * @return void |
||
13 | */ |
||
14 | public function boot() |
||
15 | { |
||
16 | /** |
||
17 | * Export the config file |
||
18 | * php artisan vendor:publish --provider="Sreedev\Slack\SlackServiceProvider" --tag="config" |
||
19 | **/ |
||
20 | if ($this->app->runningInConsole()) { |
||
21 | |||
22 | $this->publishes([ |
||
23 | __DIR__.'/../config/config.php' => config_path('slack.php'), |
||
24 | ], 'config'); |
||
25 | |||
26 | } |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * register |
||
31 | * |
||
32 | * @return void |
||
33 | */ |
||
34 | public function register() |
||
35 | { |
||
36 | $this->app->singleton('slack', function($app){ |
||
0 ignored issues
–
show
|
|||
37 | return new Slack(config("slack.SLACK_API_TOKEN")); |
||
38 | }); |
||
39 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'slack'); |
||
40 | } |
||
41 | |||
42 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.