| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function iterate(IterateEvent $event) |
||
| 44 | { |
||
| 45 | if (!method_exists($event->getIterator(), 'isBufferEmpty')) { |
||
| 46 | throw new \LogicException('You can\'t use DoctrineOptimizeListener with this iterator'); |
||
| 47 | } |
||
| 48 | |||
| 49 | if ($event->getIterator()->isBufferEmpty()) { |
||
| 50 | $this->doctrine->getManager()->getUnitOfWork()->clear(); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..