Total Complexity | 1 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | abstract class Command |
||
9 | { |
||
10 | |||
11 | public const SUCCESS = 0; |
||
12 | public const FAILURE = 1; |
||
13 | public const INVALID = 2; |
||
14 | |||
15 | /** |
||
16 | * Method to prepare command arguments |
||
17 | * |
||
18 | * @param InputInterface $input |
||
19 | * @return void |
||
20 | */ |
||
21 | public function prepare(/** @scrutinizer ignore-unused */ InputInterface $input): void |
||
23 | |||
24 | } |
||
25 | |||
26 | /** |
||
27 | * In this method you should be implement main logic of your command |
||
28 | * In $input you will find arguments and options |
||
29 | * In $output write to console |
||
30 | * |
||
31 | * @param InputInterface $input |
||
32 | * @param OutputInterface $output |
||
33 | * @return int |
||
34 | */ |
||
35 | abstract public function execute(InputInterface $input, OutputInterface $output): int; |
||
36 | } |