1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Matchish\ScoutElasticSearch; |
||
6 | |||
7 | use Elasticsearch\Client; |
||
8 | use Elasticsearch\ClientBuilder; |
||
9 | use Illuminate\Support\ServiceProvider; |
||
10 | |||
11 | final class ElasticSearchServiceProvider extends ServiceProvider |
||
12 | { |
||
13 | /** |
||
14 | * {@inheritdoc} |
||
15 | */ |
||
16 | 50 | public function register(): void |
|
17 | { |
||
18 | 50 | $this->mergeConfigFrom(__DIR__.'/../config/elasticsearch.php', 'elasticsearch'); |
|
0 ignored issues
–
show
|
|||
19 | |||
20 | $this->app->bind(Client::class, function () { |
||
21 | 33 | return ClientBuilder::create()->setHosts([config('elasticsearch.host')])->build(); |
|
22 | 50 | }); |
|
23 | |||
24 | 50 | $this->app->bind( |
|
25 | 50 | 'Matchish\ScoutElasticSearch\ElasticSearch\HitsIteratorAggregate', |
|
26 | 50 | 'Matchish\ScoutElasticSearch\ElasticSearch\EloquentHitsIteratorAggregate' |
|
27 | ); |
||
28 | 50 | } |
|
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | 50 | public function boot(): void |
|
34 | { |
||
35 | 50 | $this->publishes([ |
|
36 | 50 | __DIR__.'/../config/elasticsearch.php' => config_path('elasticsearch.php'), |
|
37 | 50 | ], 'config'); |
|
38 | 50 | } |
|
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | 1 | public function provides(): array |
|
44 | { |
||
45 | 1 | return [Client::class]; |
|
46 | } |
||
47 | } |
||
48 |
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.