Completed
Pull Request — master (#106)
by De Cramer
03:01
created

RunCommand::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
ccs 4
cts 4
cp 1
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace eXpansion\Framework\Core\Command;
4
5
use eXpansion\Framework\Core\Services\Application;
6
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
/**
11
 * Class eXpansion....
12
 *
13
 * @package eXpansion\Framework\Core\Command
14
 */
15
class RunCommand extends ContainerAwareCommand
16
{
17
    /** @var Application */
18
    protected $expansionApplication;
19
20
    /**
21
     * RunCommand constructor.
22
     *
23
     * @param Application $expansionApplication
24
     */
25 131
    public function __construct(Application $expansionApplication)
26
    {
27 131
        parent::__construct();
28
29 131
        $this->expansionApplication = $expansionApplication;
30 131
    }
31
32
33 131
    protected function configure()
34
    {
35 131
        $this->setName('eXpansion:run')
36 131
            ->setDescription("Run eXpansion on your server.");
37 131
    }
38
39 1
    protected function execute(InputInterface $input, OutputInterface $output)
40
    {
41 1
        $this->expansionApplication
42 1
            ->init($output)
43 1
            ->run();
44 1
    }
45
}
46