Completed
Push — master ( 16b7cb...b112db )
by Vladimir
07:44
created

FoundationServiceProvider::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 3
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Foundation\Providers;
6
7
use FondBot\Foundation\Kernel;
8
use FondBot\Foundation\ServiceProvider;
9
use Illuminate\Contracts\Bus\Dispatcher;
10
use Illuminate\Contracts\Container\Container;
11
12
class FoundationServiceProvider extends ServiceProvider
13
{
14
    public function register(): void
15
    {
16
        $this->app->singleton(Kernel::class, function () {
17
            return new Kernel(resolve(Container::class), resolve(Dispatcher::class));
18
        });
19
    }
20
}
21