Total Complexity | 2 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class SnsMiddlewareServiceProvider extends ServiceProvider implements ServiceProviderInterface |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @inheritdoc |
||
20 | */ |
||
21 | public function register() |
||
22 | { |
||
23 | $this->app->bind(HttpClientInterface::class, FileGetContentsHttpClient::class); |
||
24 | |||
25 | $this->app->bind(MessageValidator::class, function ($app) { |
||
26 | return new MessageValidator(function (string $url) use ($app) { |
||
27 | /** @var HttpClientInterface $httpClient */ |
||
28 | $httpClient = $app->make(HttpClientInterface::class); |
||
29 | |||
30 | return $httpClient->get($url); |
||
31 | }); |
||
32 | }); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @inheritdoc |
||
37 | */ |
||
38 | public function boot() |
||
40 | |||
41 | } |
||
44 |