xlstudio /
purifier
| 1 | <?php namespace Mews\Purifier; |
||||||
| 2 | |||||||
| 3 | use Illuminate\Container\Container; |
||||||
| 4 | use Illuminate\Foundation\Application as LaravelApplication; |
||||||
| 5 | use Illuminate\Support\ServiceProvider; |
||||||
| 6 | use Laravel\Lumen\Application as LumenApplication; |
||||||
|
0 ignored issues
–
show
|
|||||||
| 7 | |||||||
| 8 | class PurifierServiceProvider extends ServiceProvider |
||||||
| 9 | { |
||||||
| 10 | /** |
||||||
| 11 | * Indicates if loading of the provider is deferred. |
||||||
| 12 | * |
||||||
| 13 | * @var bool |
||||||
| 14 | */ |
||||||
| 15 | protected $defer = true; |
||||||
| 16 | |||||||
| 17 | /** |
||||||
| 18 | * Boot the service provider. |
||||||
| 19 | * |
||||||
| 20 | * @return null |
||||||
| 21 | */ |
||||||
| 22 | public function boot() |
||||||
| 23 | { |
||||||
| 24 | if ($this->app instanceof LaravelApplication) { |
||||||
| 25 | $this->publishes([$this->getConfigSource() => config_path('purifier.php')]); |
||||||
| 26 | } elseif ($this->app instanceof LumenApplication) { |
||||||
| 27 | $this->app->configure('purifier'); |
||||||
|
0 ignored issues
–
show
The method
configure() does not exist on Tests\Laravel\App.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 28 | } |
||||||
| 29 | } |
||||||
| 30 | |||||||
| 31 | /** |
||||||
| 32 | * Get the config source. |
||||||
| 33 | * |
||||||
| 34 | * @return string |
||||||
| 35 | */ |
||||||
| 36 | protected function getConfigSource() |
||||||
| 37 | { |
||||||
| 38 | return realpath(__DIR__.'/../config/purifier.php'); |
||||||
| 39 | } |
||||||
| 40 | |||||||
| 41 | /** |
||||||
| 42 | * Register the service provider. |
||||||
| 43 | * |
||||||
| 44 | * @return void |
||||||
| 45 | */ |
||||||
| 46 | public function register() |
||||||
| 47 | { |
||||||
| 48 | $this->mergeConfigFrom($this->getConfigSource(), 'purifier'); |
||||||
|
0 ignored issues
–
show
The method
mergeConfigFrom() does not exist on Mews\Purifier\PurifierServiceProvider.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 49 | |||||||
| 50 | $this->app->singleton('purifier', function (Container $app) { |
||||||
|
0 ignored issues
–
show
The method
singleton() does not exist on Tests\Laravel\App.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 51 | return new Purifier($app['files'], $app['config']); |
||||||
| 52 | }); |
||||||
| 53 | |||||||
| 54 | $this->app->alias('purifier', Purifier::class); |
||||||
|
0 ignored issues
–
show
The method
alias() does not exist on Tests\Laravel\App.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 55 | } |
||||||
| 56 | |||||||
| 57 | /** |
||||||
| 58 | * Get the services provided by the provider. |
||||||
| 59 | * |
||||||
| 60 | * @return array |
||||||
| 61 | */ |
||||||
| 62 | public function provides() |
||||||
| 63 | { |
||||||
| 64 | return ['purifier']; |
||||||
| 65 | } |
||||||
| 66 | } |
||||||
| 67 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths