GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 414922...a9bc98 )
by butschster
12:35
created

SectionProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 33
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A fire() 0 11 2
1
<?php
2
3
namespace SleepingOwl\Admin\Console\Commands;
4
5
use Illuminate\Console\Command;
6
use Illuminate\Filesystem\Filesystem;
7
use SleepingOwl\Admin\Console\Installation\CreateSectionServiceProvider;
8
9
class SectionProvider extends Command
10
{
11
    /**
12
     * The console command name.
13
     *
14
     * @var string
15
     */
16
    protected $name = 'sleepingowl:section:provider';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Create [AdminSectionsServiceProvider] class';
24
25
    /**
26
     * Execute the console command.
27
     *
28
     * @param Filesystem $files
29
     */
30
    public function fire(Filesystem $files)
31
    {
32
        $installer = new CreateSectionServiceProvider($this, $files);
0 ignored issues
show
Documentation introduced by
$this is of type this<SleepingOwl\Admin\C...mmands\SectionProvider>, but the function expects a object<SleepingOwl\Admin...ommands\InstallCommand>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
Documentation introduced by
$files is of type object<Illuminate\Filesystem\Filesystem>, but the function expects a object<Illuminate\Config\Repository>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
33
        if ($installer->installed()) {
34
            $this->line('File <info>AdminSectionsServiceProvider</info> exists');
35
36
            return;
37
        }
38
39
        $installer->install();
40
    }
41
}
42