1 | <?php |
||||
2 | |||||
3 | namespace ScoutEngines\Solr; |
||||
4 | |||||
5 | use Illuminate\Support\ServiceProvider; |
||||
6 | use Laravel\Scout\EngineManager; |
||||
7 | use Solarium\Client; |
||||
8 | |||||
9 | class SolrProvider extends ServiceProvider |
||||
10 | { |
||||
11 | /** |
||||
12 | * Bootstrap the application services. |
||||
13 | */ |
||||
14 | public function boot() |
||||
15 | { |
||||
16 | app(EngineManager::class)->extend('solr', function ($app) { |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() The parameter
$app is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
17 | $config = [ |
||||
18 | 'endpoint' => [ |
||||
19 | 'default' => [ |
||||
20 | 'host' => config('scout.solr.host'), |
||||
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
![]() |
|||||
21 | 'port' => config('scout.solr.port'), |
||||
22 | 'path' => config('scout.solr.path'), |
||||
23 | 'core' => config('scout.solr.core'), |
||||
24 | ], |
||||
25 | ], |
||||
26 | ]; |
||||
27 | |||||
28 | return new SolrEngine(new Client($config)); |
||||
29 | }); |
||||
30 | } |
||||
31 | } |
||||
32 |