Issues (12)

src/SlackServiceProvider.php (1 issue)

Severity
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
The parameter $app is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

36
        $this->app->singleton('slack', function(/** @scrutinizer ignore-unused */ $app){

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
37
            return new Slack(config("slack.SLACK_API_TOKEN"));
38
        });
39
        $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'slack'); 
40
    }
41
42
}