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

AbstractCommand::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
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