GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 200536...4b06eb )
by Simon
05:26
created

register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 16
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
1
<?php declare(strict_types = 1);
2
namespace SmoothPhp\LaravelAdapter\StrongConsistency;
3
4
use Illuminate\Contracts\Foundation\Application;
5
use Illuminate\Support\ServiceProvider;
6
use SmoothPhp\CommandBus\SimpleCommandBus;
7
use SmoothPhp\CommandBus\SimpleCommandTranslator;
8
use SmoothPhp\Contracts\CommandBus\CommandBus;
9
use SmoothPhp\Contracts\CommandBus\CommandTranslator;
10
use SmoothPhp\LaravelAdapter\CommandBus\LaravelCommandBusHandlerResolver;
11
12
/**
13
 * Class StrongConsistencyCommandBusServiceProvider
14
 * @package SmoothPhp\LaravelAdapter\StrongConsistency
15
 * @author Simon Bennett <[email protected]>
16
 */
17
final class StrongConsistencyCommandBusServiceProvider extends ServiceProvider
18
{
19
    /**
20
     * Register the service provider.
21
     *
22
     * @return void
23
     */
24
    public function register()
25
    {
26
        $this->app->bind(CommandTranslator::class, SimpleCommandTranslator::class);
27
28
        $this->app->singleton(
29
            CommandBus::class,
30
            function (Application $application) {
31
                $simpleCommandBus = new SimpleCommandBus(
32
                    $application->make(CommandTranslator::class),
33
                    $application->make(LaravelCommandBusHandlerResolver::class)
34
                );
35
36
                return new StrongConsistencyCommandBus($simpleCommandBus);
37
            }
38
        );
39
    }
40
}
41