1 | <?php |
||
16 | class Console implements ContainerAwareInterface |
||
17 | { |
||
18 | use ContainerAwareTrait; |
||
19 | |||
20 | /** |
||
21 | * Array of available command objects |
||
22 | * |
||
23 | * @var CommandInterface[] |
||
24 | * @since 1.0 |
||
25 | */ |
||
26 | private $commands = []; |
||
27 | |||
28 | /** |
||
29 | * Get the available commands. |
||
30 | * |
||
31 | * @return CommandInterface[] |
||
32 | * |
||
33 | * @since 1.0 |
||
34 | * @throws \RuntimeException |
||
35 | */ |
||
36 | public function getCommands() |
||
45 | |||
46 | /** |
||
47 | * Load the application's commands |
||
48 | * |
||
49 | * @return CommandInterface[] |
||
50 | * |
||
51 | * @since 1.0 |
||
52 | */ |
||
53 | private function loadCommands() |
||
78 | } |
||
79 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.