| 1 | <?php |
||
| 19 | class Loader |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Validator of configuration |
||
| 23 | * |
||
| 24 | * @var Hydrator |
||
| 25 | */ |
||
| 26 | private $hydrator; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Constructor |
||
| 30 | * |
||
| 31 | * @param Hydrator $hydrator |
||
| 32 | */ |
||
| 33 | public function __construct(Hydrator $hydrator) { |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Load config file |
||
| 39 | * |
||
| 40 | * @param $filename |
||
| 41 | * @return Configuration |
||
| 42 | * @throws \RuntimeException |
||
| 43 | */ |
||
| 44 | public function load($filename) { |
||
| 59 | } |
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.