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
|
|||
17 | $config = [ |
||
18 | 'endpoint' => [ |
||
19 | 'default' => [ |
||
20 | 'host' => config('scout.solr.host'), |
||
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 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.