DeployHistoryPlugin   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 17
ccs 0
cts 10
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 2 1
A configure() 0 10 1
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
}