Passed
Push — master ( 379433...409871 )
by Alexey
02:52
created

ServiceProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
ccs 0
cts 5
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace CodeblogPro\YandexSpeller;
4
5
use CodeblogPro\YandexSpeller\Application\Contracts\AnswerInterface;
6
use CodeblogPro\YandexSpeller\Application\Contracts\YandexSpellerInterface;
7
use CodeblogPro\YandexSpeller\Application\Models\Answer;
8
use CodeblogPro\YandexSpeller\Application\Services\YandexSpeller\YandexSpellerService;
9
10
class ServiceProvider extends \Illuminate\Support\ServiceProvider
11
{
12
    public function register(): void
13
    {
14
        parent::register();
15
16
        $this->app->bind(YandexSpellerInterface::class, YandexSpellerService::class);
17
        $this->app->bind(AnswerInterface::class, Answer::class);
18
    }
19
20
    public function boot(): void
21
    {
22
        $this->loadRoutesFrom(__DIR__ . '/../routes/yandex-speller.php');
23
        $this->publishes([
24
            __DIR__ . '/../config/yandexspeller.php' => config_path('yandexspeller.php'),
0 ignored issues
show
Bug introduced by
The function config_path 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 ignore-call  annotation

24
            __DIR__ . '/../config/yandexspeller.php' => /** @scrutinizer ignore-call */ config_path('yandexspeller.php'),
Loading history...
25
            'yandexspeller-config'
26
        ]);
27
        $this->mergeConfigFrom(__DIR__ . '/../config/yandexspeller.php', 'yandexspeller');
28
    }
29
}
30