| 1 | <?php |
||
| 10 | final class FormProcessor implements EntityProcessorInterface |
||
| 11 | { |
||
| 12 | /** @var FormFactoryInterface */ |
||
| 13 | private $factory; |
||
| 14 | /** @var string|FormTypeInterface */ |
||
| 15 | private $form; |
||
| 16 | /** @var array */ |
||
| 17 | private $options = []; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * FormProcessor constructor. |
||
| 21 | * |
||
| 22 | * @param FormFactoryInterface $factory |
||
| 23 | * @param string|FormTypeInterface $form |
||
| 24 | * @param array $options |
||
| 25 | */ |
||
| 26 | 1 | public function __construct(FormFactoryInterface $factory, $form, array $options = []) |
|
| 32 | |||
| 33 | /** {@inheritdoc} */ |
||
| 34 | 1 | public function updateEntity($entity, $data) |
|
| 46 | } |
||
| 47 |
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.