zingimmick /
laravel-query-builder
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | declare(strict_types=1); |
||||||
| 4 | |||||||
| 5 | namespace Zing\QueryBuilder; |
||||||
| 6 | |||||||
| 7 | use Illuminate\Contracts\Support\DeferrableProvider; |
||||||
| 8 | use Illuminate\Foundation\Application as Laravel; |
||||||
| 9 | use Illuminate\Support\ServiceProvider; |
||||||
| 10 | use Laravel\Lumen\Application as Lumen; |
||||||
|
0 ignored issues
–
show
|
|||||||
| 11 | |||||||
| 12 | class QueryBuilderServiceProvider extends ServiceProvider implements DeferrableProvider |
||||||
| 13 | { |
||||||
| 14 | 35 | public function boot(): void |
|||||
| 15 | { |
||||||
| 16 | 35 | if ($this->app->runningInConsole() && $this->app instanceof Laravel) { |
|||||
| 17 | 35 | $this->publishes( |
|||||
| 18 | [ |
||||||
| 19 | 35 | $this->getConfigPath() => config_path('query-builder.php'), |
|||||
| 20 | ], |
||||||
| 21 | 35 | 'config' |
|||||
| 22 | ); |
||||||
| 23 | } |
||||||
| 24 | 35 | } |
|||||
| 25 | |||||||
| 26 | 35 | public function register(): void |
|||||
| 27 | { |
||||||
| 28 | 35 | $this->registerConfig(); |
|||||
| 29 | 35 | $this->app->singleton( |
|||||
| 30 | 35 | QueryBuilderFactory::class, |
|||||
| 31 | function () { |
||||||
| 32 | 1 | return new QueryBuilderFactory(config('query-builder.builders')); |
|||||
| 33 | 35 | } |
|||||
| 34 | ); |
||||||
| 35 | 35 | } |
|||||
| 36 | |||||||
| 37 | 35 | protected function getConfigPath(): string |
|||||
| 38 | { |
||||||
| 39 | 35 | return __DIR__ . '/../config/query-builder.php'; |
|||||
| 40 | } |
||||||
| 41 | |||||||
| 42 | 35 | protected function registerConfig(): void |
|||||
| 43 | { |
||||||
| 44 | 35 | if ($this->app instanceof Lumen) { |
|||||
| 45 | $this->app->configure('query-builder'); |
||||||
|
0 ignored issues
–
show
The method
configure() does not exist on Illuminate\Contracts\Foundation\Application. Did you maybe mean configPath()?
(
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...
|
|||||||
| 46 | } |
||||||
| 47 | |||||||
| 48 | 35 | $this->mergeConfigFrom($this->getConfigPath(), 'query-builder'); |
|||||
| 49 | 35 | } |
|||||
| 50 | |||||||
| 51 | 1 | public function provides() |
|||||
| 52 | { |
||||||
| 53 | return [ |
||||||
| 54 | 1 | QueryBuilderFactory::class, |
|||||
| 55 | ]; |
||||||
| 56 | } |
||||||
| 57 | } |
||||||
| 58 |
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