1 | <?php |
||
10 | abstract class Command |
||
11 | { |
||
12 | /** |
||
13 | * @var OptionsInterface |
||
14 | */ |
||
15 | private $options; |
||
16 | |||
17 | /** |
||
18 | * Execute the command using the current options. |
||
19 | * |
||
20 | * @return mixed |
||
21 | */ |
||
22 | abstract public function execute(); |
||
23 | |||
24 | /** |
||
25 | * Allow usage as a callable. |
||
26 | * |
||
27 | * @see Command::execute() |
||
28 | * |
||
29 | * @return mixed |
||
30 | */ |
||
31 | 1 | final public function __invoke() |
|
35 | |||
36 | /** |
||
37 | * Get the currently defined options. |
||
38 | * |
||
39 | * @return OptionsInterface |
||
40 | * |
||
41 | * @throws CommandException |
||
42 | * If no options have been added to the command. |
||
43 | */ |
||
44 | 2 | final public function options() |
|
52 | |||
53 | /** |
||
54 | * Get a copy with new options. |
||
55 | * |
||
56 | * @param OptionsInterface $options |
||
57 | * |
||
58 | * @return static |
||
59 | */ |
||
60 | 1 | final public function withOptions(Options $options) |
|
67 | } |
||
68 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..