1 | <?php |
||||
2 | |||||
3 | namespace ZanySoft\LaravelSerpApi; |
||||
4 | |||||
5 | use Illuminate\Support\ServiceProvider; |
||||
0 ignored issues
–
show
|
|||||
6 | |||||
7 | class SerpApiServiceProvider extends ServiceProvider |
||||
8 | { |
||||
9 | /** |
||||
10 | * Boot the service provider. |
||||
11 | */ |
||||
12 | public function boot() |
||||
13 | { |
||||
14 | if (function_exists('config_path')) { |
||||
15 | $this->publishes([ |
||||
16 | __DIR__ . '/config/config.php' => config_path('laravel-serpapi.php'), |
||||
17 | ], 'serpapi-config'); |
||||
18 | } |
||||
19 | } |
||||
20 | |||||
21 | /** |
||||
22 | * Register the service provider. |
||||
23 | * |
||||
24 | * @return void |
||||
25 | */ |
||||
26 | public function register() |
||||
27 | { |
||||
28 | $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'laravel-serpapi'); |
||||
29 | |||||
30 | $this->app->bind('laravel-serpapi-search', function () { |
||||
31 | |||||
32 | $api_key = config('laravel-serpapi.api_key'); |
||||
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
33 | $engine = config('laravel-serpapi.search_engine') ?: 'google'; |
||||
34 | |||||
35 | return new SerpApiSearch($api_key, $engine); |
||||
36 | }); |
||||
37 | } |
||||
38 | } |
||||
39 |
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