1 | <?php |
||
28 | abstract class AbstractCommand extends Command |
||
29 | { |
||
30 | /** |
||
31 | * @var InputInterface |
||
32 | */ |
||
33 | protected $input; |
||
34 | |||
35 | /** |
||
36 | * @var OutputInterface |
||
37 | */ |
||
38 | protected $output; |
||
39 | |||
40 | /** |
||
41 | * @var Config |
||
42 | */ |
||
43 | private $config; |
||
44 | |||
45 | /** |
||
46 | * @var JsonConfigSource |
||
47 | */ |
||
48 | private $configSource; |
||
49 | |||
50 | /** |
||
51 | * @var string |
||
52 | */ |
||
53 | private $configPath; |
||
54 | |||
55 | /** |
||
56 | * @var string |
||
57 | */ |
||
58 | private $configPathFromInput; |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | * |
||
63 | * @return Application |
||
64 | */ |
||
65 | 24 | public function getApplication() |
|
69 | |||
70 | /** |
||
71 | * {@inheritDoc} |
||
72 | */ |
||
73 | 24 | protected function configure() |
|
82 | |||
83 | /** |
||
84 | * {@inheritDoc} |
||
85 | */ |
||
86 | 24 | protected function initialize(InputInterface $input, OutputInterface $output) |
|
92 | |||
93 | /** |
||
94 | * @return string |
||
95 | */ |
||
96 | 1 | protected function getConfigPath() |
|
102 | |||
103 | /** |
||
104 | * @return JsonConfigSource |
||
105 | */ |
||
106 | 2 | protected function getConfigSource() |
|
112 | |||
113 | /** |
||
114 | * @return Config |
||
115 | * |
||
116 | * @throws \Exception |
||
117 | */ |
||
118 | 5 | protected function getConfig() |
|
147 | |||
148 | /** |
||
149 | * @param string $message |
||
150 | */ |
||
151 | 18 | protected function writeOk($message) |
|
155 | |||
156 | /** |
||
157 | * @param string $message |
||
158 | */ |
||
159 | 1 | protected function writeComment($message) |
|
163 | |||
164 | /** |
||
165 | * @param string $message |
||
166 | */ |
||
167 | 21 | protected function writeError($message) |
|
171 | |||
172 | /** |
||
173 | * @param array $headers |
||
174 | * |
||
175 | * @return Table |
||
176 | */ |
||
177 | 1 | protected function createTable(array $headers = []) |
|
187 | |||
188 | /** |
||
189 | * @param array $keysValues |
||
190 | * |
||
191 | * @return Table |
||
192 | */ |
||
193 | 1 | protected function createKeyValueTable(array $keysValues) |
|
202 | |||
203 | /** |
||
204 | * @return bool |
||
205 | */ |
||
206 | 20 | protected function isTest() |
|
216 | |||
217 | /** |
||
218 | * @return bool |
||
219 | */ |
||
220 | 19 | protected function isTestSuccess() |
|
224 | } |
||
225 |
If you suppress an error, we recommend checking for the error condition explicitly: