ServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 12
c 1
b 0
f 0
dl 0
loc 24
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 5 1
A registerBindings() 0 15 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ReliqArts\Logistiq\Tracking\Providers;
6
7
use ReliqArts\Logistiq\Tracking\Contracts\EventCreator as EventCreatorContract;
8
use ReliqArts\Logistiq\Tracking\Contracts\Tracker as TrackerContract;
9
use ReliqArts\Logistiq\Tracking\Contracts\TrackingUpdate as TrackingUpdateContract;
10
use ReliqArts\Logistiq\Tracking\Models\TrackingUpdate;
11
use ReliqArts\Logistiq\Tracking\Services\EventCreator;
12
use ReliqArts\Logistiq\Tracking\Services\Tracker;
13
use ReliqArts\ServiceProvider as IlluminateServiceProvider;
14
15
final class ServiceProvider extends IlluminateServiceProvider
16
{
17
    public function register()
18
    {
19
        parent::register();
20
21
        $this->app->register(EventServiceProvider::class);
22
    }
23
24
    protected function registerBindings(): void
25
    {
26
        $this->app->singleton(
27
            EventCreatorContract::class,
28
            EventCreator::class
29
        );
30
31
        $this->app->singleton(
32
            TrackerContract::class,
33
            Tracker::class
34
        );
35
36
        $this->app->singleton(
37
            TrackingUpdateContract::class,
38
            TrackingUpdate::class
39
        );
40
    }
41
}
42