1 | <?php |
||||||
2 | |||||||
3 | declare(strict_types=1); |
||||||
4 | |||||||
5 | namespace Zing\QueryBuilder; |
||||||
6 | |||||||
7 | use Illuminate\Foundation\Application as Laravel; |
||||||
8 | use Illuminate\Support\ServiceProvider; |
||||||
9 | use Laravel\Lumen\Application as Lumen; |
||||||
0 ignored issues
–
show
|
|||||||
10 | |||||||
11 | /** |
||||||
12 | * @deprecated No need for service provider |
||||||
13 | */ |
||||||
14 | class QueryBuilderServiceProvider extends ServiceProvider |
||||||
15 | { |
||||||
16 | 69 | public function boot(): void |
|||||
17 | { |
||||||
18 | 69 | QueryConfiguration::setPerPage((int) config('query-builder.per_page.default')); |
|||||
19 | 69 | QueryConfiguration::setPageName((string) config('query-builder.per_page.key')); |
|||||
20 | 69 | if (! $this->app->runningInConsole()) { |
|||||
21 | return; |
||||||
22 | } |
||||||
23 | |||||||
24 | 69 | if (! $this->app instanceof Laravel) { |
|||||
25 | return; |
||||||
26 | } |
||||||
27 | |||||||
28 | 69 | $this->publishes([ |
|||||
29 | 69 | $this->getConfigPath() => config_path('query-builder.php'), |
|||||
30 | ], 'config'); |
||||||
31 | } |
||||||
32 | |||||||
33 | 69 | public function register(): void |
|||||
34 | { |
||||||
35 | 69 | $this->registerConfig(); |
|||||
36 | } |
||||||
37 | |||||||
38 | 69 | protected function getConfigPath(): string |
|||||
39 | { |
||||||
40 | 69 | return __DIR__ . '/../config/query-builder.php'; |
|||||
41 | } |
||||||
42 | |||||||
43 | 69 | protected function registerConfig(): void |
|||||
44 | { |
||||||
45 | 69 | if ($this->app instanceof Lumen) { |
|||||
46 | $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. ![]() |
|||||||
47 | } |
||||||
48 | |||||||
49 | 69 | $this->mergeConfigFrom($this->getConfigPath(), 'query-builder'); |
|||||
50 | } |
||||||
51 | } |
||||||
52 |
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