| 1 | <?php |
||
| 11 | class Context extends Provider |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @param string $name |
||
| 15 | * @param SwContext|null $parent |
||
| 16 | * |
||
| 17 | * @return SwContext|null |
||
| 18 | */ |
||
| 19 | public function get($name, $parent = null) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $class |
||
| 38 | * @param SwContext|null $parent |
||
| 39 | * @param Module $module |
||
| 40 | * |
||
| 41 | * @return SwContext |
||
| 42 | */ |
||
| 43 | private function newContext($class, $parent, $module) |
||
| 47 | } |
||
| 48 |
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.