Issues (1019)

src/Illuminate/Cleaners/AuthCleaner.php (7 issues)

1
<?php
2
0 ignored issues
show
Missing file doc comment
Loading history...
3
namespace Hhxsv5\LaravelS\Illuminate\Cleaners;
4
5
6
use Illuminate\Container\Container;
0 ignored issues
show
The type Illuminate\Container\Container was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Illuminate\Support\Facades\Facade;
0 ignored issues
show
The type Illuminate\Support\Facades\Facade was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
9
class AuthCleaner extends BaseCleaner
0 ignored issues
show
Missing doc comment for class AuthCleaner
Loading history...
10
{
11
    private $guards;
0 ignored issues
show
Private member variable "guards" must be prefixed with an underscore
Loading history...
12
13
    public function __construct(Container $currentApp, Container $snapshotApp)
0 ignored issues
show
Missing doc comment for function __construct()
Loading history...
14
    {
15
        parent::__construct($currentApp, $snapshotApp);
16
17
        if (!isset($this->currentApp['auth'])) {
18
            return;
19
        }
20
        $ref = new \ReflectionObject($this->currentApp['auth']);
21
        if ($ref->hasProperty('guards')) {
22
            $this->guards = $ref->getProperty('guards');
23
        } else {
24
            $this->guards = $ref->getProperty('drivers');
25
        }
26
        $this->guards->setAccessible(true);
27
    }
28
29
    public function clean()
0 ignored issues
show
Missing doc comment for function clean()
Loading history...
30
    {
31
        if (!isset($this->currentApp['auth'])) {
32
            return;
33
        }
34
        $this->guards->setValue($this->currentApp['auth'], []);
35
        $this->currentApp->forgetInstance('auth.driver');
36
        Facade::clearResolvedInstance('auth.driver');
37
    }
38
}