Completed
Push — master ( 78b4bc...aee67f )
by Lorenzo
01:34
created

AffiliateNetworkServiceProvider::provides()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Padosoft\AffiliateNetwork;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class AffiliateNetworkServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Indicates if loading of the provider is deferred.
11
     *
12
     * @var bool
13
     */
14
    protected $defer = true;
15
16
    /**
17
     * Bootstrap the application events.
18
     *
19
     * @return void
20
     */
21
    public function boot()
22
    {
23
        $this->publishes([
24
            __DIR__ . '/config/config.php' => config_path('laravel-affiliate-network.php'),
25
        ], 'config');
26
    }
27
28
    /**
29
     * Register the service provider.
30
     *
31
     * @return void
32
     */
33
    public function register()
34
    {
35
        $this->app->share('alert', function (NetworkInterface $network) {
1 ignored issue
show
Bug introduced by
The method share() does not seem to exist on object<Illuminate\Contra...Foundation\Application>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
36
            return new NetworkManager($network);
37
        });
38
        $this->app->alias('networkmanager', NetworkManager::class);
39
    }
40
41
    /**
42
     * Get the services provided by the provider.
43
     *
44
     * @return string[]
45
     */
46
    public function provides()
47
    {
48
        return [
49
            'networkmanager',
50
        ];
51
    }
52
}
53