DeployHistoryPlugin::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 2
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
4
namespace Deployee\Plugins\DeployHistory;
5
6
7
use Deployee\Components\Container\ContainerInterface;
8
use Deployee\Components\DocBlock\DocBlock;
9
use Deployee\Components\Persistence\LazyPDO;
10
use Deployee\Components\Plugins\PluginInterface;
11
use Deployee\Plugins\DeployHistory\Subscriber\FindExecutableDefinitionsSubscriber;
12
use Deployee\Plugins\DeployHistory\Subscriber\InstallSubscriber;
13
use Deployee\Plugins\DeployHistory\Subscriber\PostDispatchDeploymentSubscriber;
14
use Symfony\Component\EventDispatcher\EventDispatcher;
15
16
class DeployHistoryPlugin implements PluginInterface
17
{
18
    public function boot(ContainerInterface $container)
19
    {
20
21
    }
22
23
    public function configure(ContainerInterface $container)
24
    {
25
        /* @var LazyPDO $lazyPdo */
26
        $lazyPdo = $container->get(LazyPDO::class);
27
28
        /* @var EventDispatcher $eventDispatcher */
29
        $eventDispatcher = $container->get(EventDispatcher::class);
30
        $eventDispatcher->addSubscriber(new InstallSubscriber($lazyPdo));
31
        $eventDispatcher->addSubscriber(new FindExecutableDefinitionsSubscriber($lazyPdo, new DocBlock()));
32
        $eventDispatcher->addSubscriber(new PostDispatchDeploymentSubscriber($lazyPdo));
33
    }
34
35
}