1 | <?php |
||
15 | class EmbeddedsFactory |
||
16 | { |
||
17 | /** |
||
18 | * @var RelationsRepository |
||
19 | */ |
||
20 | private $relationsRepository; |
||
21 | |||
22 | /** |
||
23 | * @var ExpressionEvaluator |
||
24 | */ |
||
25 | private $expressionEvaluator; |
||
26 | |||
27 | /** |
||
28 | * @var ExclusionManager |
||
29 | */ |
||
30 | private $exclusionManager; |
||
31 | |||
32 | /** |
||
33 | * @param RelationsRepository $relationsRepository |
||
34 | * @param ExpressionEvaluator $expressionEvaluator |
||
35 | * @param ExclusionManager $exclusionManager |
||
36 | */ |
||
37 | public function __construct( |
||
46 | /** |
||
47 | * @param object $object |
||
48 | * @param SerializationContext $context |
||
49 | * @return Embedded[] |
||
50 | */ |
||
51 | public function create($object, SerializationContext $context) |
||
70 | } |
||
71 |
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.