1 | <?php |
||
23 | class InstitutionAuthorizationContext implements InstitutionAuthorizationContextInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var Institution |
||
27 | */ |
||
28 | private $actorInstitution; |
||
29 | |||
30 | /** |
||
31 | * @var InstitutionRoleSet |
||
32 | */ |
||
33 | private $roleRequirements; |
||
34 | |||
35 | /** |
||
36 | * @var bool |
||
37 | */ |
||
38 | private $isSraa; |
||
39 | |||
40 | /** |
||
41 | * AuthorizationContext constructor. |
||
42 | * @param Institution $actorInstitution |
||
43 | * @param InstitutionRoleSetInterface $roleRequirements |
||
44 | * @param bool $isSraa describes if the actor is SRAA or not. Default: false |
||
45 | */ |
||
46 | public function __construct( |
||
55 | |||
56 | /** |
||
57 | * @return Institution |
||
58 | */ |
||
59 | public function getActorInstitution() |
||
63 | |||
64 | /** |
||
65 | * @return InstitutionRoleSet |
||
66 | */ |
||
67 | public function getRoleRequirements() |
||
71 | |||
72 | /** |
||
73 | * @return bool |
||
74 | */ |
||
75 | public function isActorSraa() |
||
79 | } |
||
80 |
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.