Completed
Push — develop ( a0c664...f8e6eb )
by Tom
04:27
created

AbstractSubCommand::getOptionalBooleanOption()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 19
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 19
rs 9.4285
cc 3
eloc 11
nc 2
nop 3
1
<?php
2
3
namespace N98\Magento\Command\SubCommand;
4
5
use N98\Magento\Command\AbstractMagentoCommand;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
abstract class AbstractSubCommand implements SubCommandInterface
10
{
11
    /**
12
     * @var ConfigBag
13
     */
14
    protected $config;
15
16
    /**
17
     * @var array
18
     */
19
    protected $commandConfig;
20
21
    /**
22
     * @var InputInterface
23
     */
24
    protected $input;
25
26
    /**
27
     * @var OutputInterface
28
     */
29
    protected $output;
30
31
    /**
32
     * @var AbstractMagentoCommand
33
     */
34
    protected $command;
35
36
    /**
37
     * @param ConfigBag $config
38
     */
39
    public function setConfig(ConfigBag $config)
40
    {
41
        $this->config = $config;
42
    }
43
44
    /**
45
     * @param array $commandConfig
46
     */
47
    public function setCommandConfig(array $commandConfig)
48
    {
49
        $this->commandConfig = $commandConfig;
50
    }
51
52
    /**
53
     * @param InputInterface $input
54
     */
55
    public function setInput(InputInterface $input)
56
    {
57
        $this->input = $input;
58
    }
59
60
    /**
61
     * @param OutputInterface $output
62
     */
63
    public function setOutput(OutputInterface $output)
64
    {
65
        $this->output = $output;
66
    }
67
68
    /**
69
     * @return AbstractMagentoCommand
70
     */
71
    public function getCommand()
72
    {
73
        return $this->command;
74
    }
75
76
    /**
77
     * @param AbstractMagentoCommand $command
78
     */
79
    public function setCommand(AbstractMagentoCommand $command)
80
    {
81
        $this->command = $command;
82
    }
83
84
    /**
85
     * @return bool
86
     */
87
    abstract public function execute();
88
}
89