Passed
Pull Request — development (#671)
by Nick
06:47
created

AbstractCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
/***************************************************************************
3
 * for license information see LICENSE.md
4
 ***************************************************************************/
5
6
namespace Oc\Command;
7
8
use Symfony\Component\Console\Command\Command;
9
use Symfony\Component\Console\Exception\LogicException;
10
11
/**
12
 * Class AbstractCommand
13
 *
14
 * @package Oc\Command
15
 */
16
abstract class AbstractCommand extends Command
17
{
18
    const CODE_SUCCESS  = 0;
19
    const CODE_ERROR    = 1;
20
    const CODE_WARNING  = 2;
21
22
    /**
23
     * @var string
24
     */
25
    protected $rootPath;
26
27
    /**
28
     * @param string|null $name
29
     *
30
     * @throws LogicException
31
     */
32
    public function __construct($name = null)
33
    {
34
        parent::__construct($name);
35
36
        $this->rootPath = dirname(dirname(dirname(__DIR__))) . '/';
37
    }
38
}
39