hhxsv5 /
laravel-s
| 1 | <?php |
||
| 2 | |||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 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 Loading history...
|
|||
| 6 | 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 Loading history...
|
|||
| 7 | |||
| 8 | class LaravelAdminCleaner extends BaseCleaner |
||
|
0 ignored issues
–
show
|
|||
| 9 | { |
||
| 10 | const ADMIN_CLASS = 'Encore\Admin\Admin'; |
||
| 11 | |||
| 12 | private $reflection; |
||
|
0 ignored issues
–
show
|
|||
| 13 | |||
| 14 | protected $properties = [ |
||
| 15 | 'deferredScript' => [], |
||
| 16 | 'script' => [], |
||
| 17 | 'style' => [], |
||
| 18 | 'css' => [], |
||
| 19 | 'js' => [], |
||
| 20 | 'html' => [], |
||
| 21 | 'headerJs' => [], |
||
| 22 | 'manifest' => 'vendor/laravel-admin/minify-manifest.json', |
||
| 23 | 'manifestData' => [], |
||
| 24 | 'extensions' => [], |
||
| 25 | 'minifyIgnores' => [], |
||
| 26 | 'metaTitle' => null, |
||
| 27 | 'favicon' => null, |
||
| 28 | 'bootingCallbacks' => [], |
||
| 29 | 'bootedCallbacks' => [], |
||
| 30 | ]; |
||
| 31 | |||
| 32 | public function __construct(Container $currentApp, Container $snapshotApp) |
||
|
0 ignored issues
–
show
|
|||
| 33 | { |
||
| 34 | parent::__construct($currentApp, $snapshotApp); |
||
| 35 | $this->reflection = new \ReflectionClass(self::ADMIN_CLASS); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function clean() |
||
|
0 ignored issues
–
show
|
|||
| 39 | { |
||
| 40 | foreach ($this->properties as $name => $value) { |
||
| 41 | if ($this->reflection->hasProperty($name)) { |
||
| 42 | $property = $this->reflection->getProperty($name); |
||
| 43 | if ($property->isStatic()) { |
||
| 44 | if (!$property->isPublic()) { |
||
| 45 | $property->setAccessible(true); |
||
| 46 | } |
||
| 47 | $property->setValue($value); |
||
| 48 | } |
||
| 49 | } |
||
| 50 | } |
||
| 51 | $this->currentApp->forgetInstance(self::ADMIN_CLASS); |
||
| 52 | Facade::clearResolvedInstance(self::ADMIN_CLASS); |
||
| 53 | } |
||
| 54 | } |