zvermafia /
alif-api-wrapper-for-laravel
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Zvermafia\LaraTransliteration; |
||
| 4 | |||
| 5 | use GuzzleHttp\Client; |
||
| 6 | use Zvermafia\Transliteration\Transliterator; |
||
| 7 | use Zvermafia\Transliteration\Contracts\TransliteratorContract; |
||
| 8 | use Illuminate\Support\ServiceProvider; |
||
| 9 | |||
| 10 | class LaraTransliterationServiceProvider extends ServiceProvider |
||
| 11 | { |
||
| 12 | /** @var string */ |
||
| 13 | const SERVICE_NAME = 'zvermafia.laratransliterator'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Register the application services. |
||
| 17 | * |
||
| 18 | * @return void |
||
| 19 | */ |
||
| 20 | public function register() |
||
| 21 | { |
||
| 22 | // Prepare the HTTP client |
||
| 23 | $client = new Client([ |
||
| 24 | 'base_uri' => Transliterator::API_BASE_URI, |
||
| 25 | ]); |
||
| 26 | |||
| 27 | $this->app->singleton(self::SERVICE_NAME, function ($app) use ($client) { |
||
|
0 ignored issues
–
show
|
|||
| 28 | return new Transliterator($client); |
||
| 29 | }); |
||
| 30 | |||
| 31 | $this->app->alias(self::SERVICE_NAME, TransliteratorContract::class); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.