Completed
Pull Request — master (#32)
by Manuel
05:39
created

BusServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 26
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 10 1
A register() 0 4 1
1
<?php
2
3
namespace PiFinder\Providers;
4
5
use AltThree\Bus\Dispatcher;
6
use Illuminate\Support\ServiceProvider;
7
8
class BusServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap any application services.
12
     *
13
     * @param \Illuminate\Bus\Dispatcher $dispatcher
14
     */
15
    public function boot(Dispatcher $dispatcher)
16
    {
17 9
        $dispatcher->mapUsing(function ($command) {
18
            return Dispatcher::simpleMapping(
19
                $command,
20
                \PiFinder\Commands::class,
21
                \PiFinder\Handlers\Commands::class
22
            );
23 9
        });
24 9
    }
25
26
    /**
27
     * Register any application services.
28
     */
29 9
    public function register()
30
    {
31
        //
32 9
    }
33
}
34