1 | <?php |
||
18 | class BusinessEntityHelper |
||
19 | { |
||
20 | /** |
||
21 | * @var BusinessEntityRepository |
||
22 | */ |
||
23 | private $businessEntityRepository; |
||
24 | /** |
||
25 | * @var ORMBusinessEntityRepository |
||
26 | */ |
||
27 | private $ormBusinessEntityRepository; |
||
28 | /** |
||
29 | * @var BusinessEntityCacheReader |
||
30 | */ |
||
31 | private $cacheReader; |
||
32 | |||
33 | /** |
||
34 | * Constructor. |
||
35 | * |
||
36 | * @param EntityRepository|BusinessEntityRepository $businessEntityRepository |
||
37 | * @param EntityRepository $ormBusinessEntityRepository |
||
38 | * @param BusinessEntityCacheReader $cacheReader |
||
39 | * |
||
40 | * @internal param BusinessEntityCacheReader $reader |
||
41 | * @internal param CacheBuilder $builder |
||
42 | */ |
||
43 | public function __construct(EntityRepository $businessEntityRepository, EntityRepository $ormBusinessEntityRepository, BusinessEntityCacheReader $cacheReader) |
||
49 | |||
50 | /** |
||
51 | * Get a business entity.q. |
||
52 | * |
||
53 | * @param mixed $entity |
||
54 | * |
||
55 | * @return BusinessEntity |
||
56 | */ |
||
57 | public function findByEntityInstance($entity) |
||
68 | |||
69 | /** |
||
70 | * Get a business entity by classname. |
||
71 | * |
||
72 | * @param string $classname |
||
73 | * |
||
74 | * @return BusinessEntity |
||
75 | */ |
||
76 | public function findByEntityClassname($classname) |
||
80 | |||
81 | public function getAvailableForWidget($widgetName) |
||
103 | } |
||
104 |
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.