1 | <?php |
||
2 | |||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
8 | |||
9 | class AuthCleaner extends BaseCleaner |
||
0 ignored issues
–
show
|
|||
10 | { |
||
11 | private $guards; |
||
0 ignored issues
–
show
|
|||
12 | |||
13 | public function __construct(Container $currentApp, Container $snapshotApp) |
||
0 ignored issues
–
show
|
|||
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
|
|||
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 | } |