| 1 | <?php |
||
| 22 | class DebuggerFactory implements FactoryInterface |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * Debugger service name |
||
| 26 | */ |
||
| 27 | const SERVICE = 'Debugger'; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param ServiceLocatorInterface $services |
||
| 31 | * @return DebuggerInterface |
||
| 32 | */ |
||
| 33 | public function createService(ServiceLocatorInterface $services) |
||
| 39 | } |
||
| 40 |
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.