DeployEnvPlugin::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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