| Total Complexity | 3 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php namespace Tarsana\Command; |
||
| 8 | class SubCommand extends Command { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * The parent command. |
||
| 12 | * |
||
| 13 | * @var Tarsana\Command\Command |
||
|
|
|||
| 14 | */ |
||
| 15 | protected $parent; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Creates a new SubCommand. |
||
| 19 | * |
||
| 20 | * @param Command $parent |
||
| 21 | */ |
||
| 22 | public function __construct(Command $parent) |
||
| 23 | { |
||
| 24 | parent::__construct(); |
||
| 25 | $this->parent($parent) |
||
| 26 | ->console($parent->console()) |
||
| 27 | ->fs($parent->fs) |
||
| 28 | ->templatesLoader($parent->templatesLoader); |
||
| 29 | $this->config = $parent->config; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * parent getter and setter. |
||
| 34 | * |
||
| 35 | * @param Tarsana\Command\Command|null |
||
| 36 | * @return Tarsana\Command\Command |
||
| 37 | */ |
||
| 38 | public function parent(Command $value = null) |
||
| 45 | } |
||
| 46 | |||
| 48 |