1 | <?php |
||
13 | class ConfigurationReader |
||
14 | { |
||
15 | /** |
||
16 | * @var \Symfony\Component\Console\Input\InputInterface |
||
17 | */ |
||
18 | protected $input; |
||
19 | |||
20 | /** |
||
21 | * @param InputInterface $input |
||
22 | */ |
||
23 | public function __construct(InputInterface $input) |
||
27 | |||
28 | /** |
||
29 | * Read configuration information from input |
||
30 | * |
||
31 | * @return Configuration |
||
32 | */ |
||
33 | public function read() |
||
57 | |||
58 | /** |
||
59 | * Static access to reader |
||
60 | * |
||
61 | * @param InputInterface $input |
||
62 | * @return Configuration |
||
63 | */ |
||
64 | public static function readInput(InputInterface $input) |
||
70 | |||
71 | /** |
||
72 | * Execute a callback if the input object has a value for the |
||
73 | * given option name. |
||
74 | * |
||
75 | * @param string $optionName |
||
76 | * @param callable $callable |
||
77 | */ |
||
78 | protected function callForOption($optionName, callable $callable) |
||
85 | } |
||
86 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.