1 | <?php |
||
2 | |||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
3 | namespace Hhxsv5\LaravelS\Illuminate\Cleaners; |
||
4 | |||
5 | 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 ![]() |
|||
6 | |||
7 | class CookieCleaner extends BaseCleaner |
||
0 ignored issues
–
show
|
|||
8 | { |
||
9 | private $queued; |
||
0 ignored issues
–
show
|
|||
10 | |||
11 | public function __construct(Container $currentApp, Container $snapshotApp) |
||
0 ignored issues
–
show
|
|||
12 | { |
||
13 | parent::__construct($currentApp, $snapshotApp); |
||
14 | if (!isset($this->currentApp['cookie'])) { |
||
15 | return; |
||
16 | } |
||
17 | $ref = new \ReflectionObject($this->currentApp['cookie']); |
||
18 | $this->queued = $ref->getProperty('queued'); |
||
19 | $this->queued->setAccessible(true); |
||
20 | } |
||
21 | |||
22 | public function clean() |
||
0 ignored issues
–
show
|
|||
23 | { |
||
24 | if (!isset($this->currentApp['cookie'])) { |
||
25 | return; |
||
26 | } |
||
27 | $this->queued->setValue($this->currentApp['cookie'], []); |
||
28 | } |
||
29 | } |