CoinMarketCapServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 2 1
A register() 0 4 1
1
<?php
2
3
namespace Bineks\Coinmarketcap\Providers;
4
5
use Bineks\Coinmarketcap\Services\CoinMarketCap;
6
use Illuminate\Support\ServiceProvider;
7
8
/**
9
 * Class CoinMarketCapServiceProvider.
10
 */
11
class CoinMarketCapServiceProvider extends ServiceProvider
12
{
13
    /**
14
     * Bootstrap the application services.
15
     *
16
     * @return void
17
     */
18
    public function boot()
19
    {
20
        //
21
    }
22
23
    /**
24
     * Register the application services.
25
     *
26
     * @return void
27
     */
28
    public function register()
29
    {
30
        $this->app->bind('CoinMarketCap', function ($app) {
31
            return new CoinMarketCap($app);
0 ignored issues
show
Unused Code introduced by
The call to Bineks\Coinmarketcap\Ser...arketCap::__construct() has too many arguments starting with $app. ( Ignorable by Annotation )

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

31
            return /** @scrutinizer ignore-call */ new CoinMarketCap($app);

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
32
        });
33
    }
34
}
35