Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
51 | public function handleHydrate(HydrateEvent $event) |
||
52 | { |
||
53 | $document = $event->getDocument(); |
||
54 | |||
55 | if (!$document instanceof ChildrenBehavior) { |
||
56 | return; |
||
57 | } |
||
58 | |||
59 | $accessor = $event->getAccessor(); |
||
60 | $accessor->set('children', $this->proxyFactory->createChildrenCollection($document, $event->getOptions())); |
||
|
|||
61 | } |
||
62 | } |
||
63 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: