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 ( 3f2f54...ead273 )
by Ryun
15:13 queued 01:42
created

Manager::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 2
eloc 2
nc 2
nop 1
1
<?php
2
3
namespace Humweb\Sociable\Auth;
4
5
use Illuminate\Container\Container;
6
use Illuminate\Support\Manager as BaseManager;
7
8
/**
9
 * Manager
10
 *
11
 * @package Humweb\SociableConnection\Auth
12
 */
13
class Manager extends BaseManager
14
{
15
16
    /**
17
     * Create a new manager instance.
18
     *
19
     * @param  \Illuminate\Foundation\Application  $app
20
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
21
     */
22
    public function __construct($app = null)
23
    {
24
        $this->app = $app ?: Container::getInstance();
0 ignored issues
show
Documentation Bug introduced by
$app ?: \Illuminate\Cont...ontainer::getInstance() is of type object<Illuminate\Container\Container>, but the property $app was declared to be of type object<Illuminate\Foundation\Application>. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.

Either this assignment is in error or an instanceof check should be added for that assignment.

class Alien {}

class Dalek extends Alien {}

class Plot
{
    /** @var  Dalek */
    public $villain;
}

$alien = new Alien();
$plot = new Plot();
if ($alien instanceof Dalek) {
    $plot->villain = $alien;
}
Loading history...
25
    }
26
27
28
    /**
29
     * Create Laravel driver
30
     *
31
     * @return \Humweb\Sociable\Auth\LaravelDriver
32
     */
33
    protected function createLaravelDriver()
34
    {
35
        return new LaravelDriver($this->app);
36
    }
37
38
39
    /**
40
     * @return \Humweb\Sociable\Auth\SentinelDriver
41
     */
42
    protected function createSentinelDriver()
43
    {
44
        return new SentinelDriver($this->app);
45
    }
46
47
48
    /**
49
     * Get the default driver name.
50
     *
51
     * @return string
52
     */
53
    public function getDefaultDriver()
54
    {
55
        return $this->app['config']->get('social.auth_provider', 'laravel');
56
    }
57
}