1 | <?php |
||
34 | class PreFlushEventArgs extends EventArgs |
||
35 | { |
||
36 | /** |
||
37 | * @var \Doctrine\ORM\EntityManager |
||
38 | */ |
||
39 | private $em; |
||
40 | |||
41 | /** |
||
42 | * @var null|array |
||
43 | */ |
||
44 | private $entities; |
||
45 | |||
46 | /** |
||
47 | * Constructor. |
||
48 | * |
||
49 | * @param EntityManagerInterface $em |
||
50 | * @param null|array $entities |
||
51 | */ |
||
52 | 144 | public function __construct(EntityManagerInterface $em, array $entities = null) |
|
57 | |||
58 | /** |
||
59 | * @return \Doctrine\ORM\EntityManager |
||
60 | */ |
||
61 | 3 | public function getEntityManager() |
|
65 | |||
66 | /** |
||
67 | * @return bool true if flushed for a specific set of entities (explicit flush). |
||
68 | */ |
||
69 | 5 | public function hasEntities() |
|
73 | |||
74 | /** |
||
75 | * @return null|array entities being flushed in an explicit flush. |
||
76 | */ |
||
77 | 4 | public function getEntities() |
|
81 | } |
||
82 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.