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

BusServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 1
crap 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