Issues (3)

src/ServiceProvider.php (2 issues)

Severity
1
<?php
2
3
namespace AdDirector;
4
5
use AdDirector\GPT\AdGPT;
6
7
class ServiceProvider extends \Illuminate\Support\ServiceProvider
8
{
9 8
    public function boot()
10
    {
11 8
        if ($this->app->runningInConsole()) {
12 8
            $this->publishes([
13 8
                __DIR__ . '/../config/ad-director.php' => config_path('ad-director.php'),
14 8
            ], 'config');
15
16 8
            $this->publishes([
17 8
                __DIR__.'/../resources/views' => resource_path('views/vendor/ad-director'),
18 8
            ], 'views');
19
20
21 8
            $this->commands([
22 8
                //
23 8
            ]);
24
        }
25
26 8
        $this->loadViewsFrom(__DIR__.'/../resources/views', 'ad-director');
27
28 8
        $this->app->singleton('ad-gpt-manager', 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

28
        $this->app->singleton('ad-gpt-manager', 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...
29 8
            return new AdGPT();
30 8
        });
31
32 8
        $this->app->singleton('ad-director', 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

32
        $this->app->singleton('ad-director', 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...
33 8
            return new AdDirector();
34 8
        });
35
    }
36
37
    /**
38
     * @inheritDoc
39
     */
40 8
    public function register()
41
    {
42 8
        $this->mergeConfigFrom(__DIR__ . '/../config/ad-director.php', 'ad-director');
43
    }
44
}
45