Completed
Push — master ( 0945db...0da1a2 )
by Alessandro
12s queued 10s
created

AbstractCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 25
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 4 1
A getContainer() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Algatux\InfluxDbBundle\Command;
6
7
use Symfony\Component\Console\Command\Command;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
use Symfony\Component\Console\Style\SymfonyStyle;
11
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
12
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
13
use Symfony\Component\DependencyInjection\ContainerInterface;
14
15
/**
16
 * Base class for InfluxDbBundle commands.
17
 */
18
abstract class AbstractCommand extends Command implements ContainerAwareInterface
19
{
20
    use ContainerAwareTrait;
21
22
    /**
23
     * @var SymfonyStyle
24
     */
25
    protected $io;
26
27
    /**
28
     * {@inheritdoc}
29
     */
30 9
    protected function initialize(InputInterface $input, OutputInterface $output)
31
    {
32 9
        $this->io = new SymfonyStyle($input, $output);
33 9
    }
34
35
    /**
36
     * @return ContainerInterface
37
     */
38 9
    public function getContainer(): ContainerInterface
39
    {
40 9
        return $this->container;
41
    }
42
}
43