Completed
Push — master ( 7381e1...0d723c )
by Korvin
02:16
created

DefaultProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 18
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
1
<?php
2
3
namespace Buttress\Concrete\CommandBus\Provider;
4
5
use Buttress\Concrete\CommandBus\Command\Cache\Clear;
6
use Buttress\Concrete\CommandBus\Command\HandlerLocator;
7
use Buttress\Concrete\CommandBus\Command\Package\Install;
8
use Buttress\Concrete\CommandBus\Command\Package\ListPackages;
9
use Buttress\Concrete\CommandBus\Command\Package\Uninstall;
10
use Buttress\Concrete\CommandBus\Handler\CacheHandler;
11
use Buttress\Concrete\CommandBus\Handler\PackageHandler;
12
use Buttress\Concrete\Locator\Site;
13
14
class DefaultProvider implements Provider
15
{
16
17
    /**
18
     * Provide handlers to the HandlerLocator
19
     *
20
     * @param \Buttress\Concrete\CommandBus\Command\HandlerLocator $locator
21
     * @param \Buttress\Concrete\Locator\Site $site
22
     * @return void
23
     */
24
    public function register(HandlerLocator $locator, Site $site)
25
    {
26
        $locator->pushHandler(Install::class, PackageHandler::class);
27
        $locator->pushHandler(Uninstall::class, PackageHandler::class);
28
        $locator->pushHandler(ListPackages::class, PackageHandler::class);
29
        $locator->pushHandler(Clear::class, CacheHandler::class);
30
    }
31
}
32