1 | <?php |
||
13 | class SecurityWithFacilityPermission extends SecurityDecoratorBase |
||
14 | { |
||
15 | /** |
||
16 | * @var UserIdentificationInterface |
||
17 | */ |
||
18 | private $userIdentification; |
||
19 | |||
20 | /** |
||
21 | * @var PermissionVoterInterface |
||
22 | */ |
||
23 | private $permissionVoter; |
||
24 | |||
25 | /** |
||
26 | * @param SecurityInterface $decoratee |
||
27 | * @param UserIdentificationInterface $userIdentification |
||
28 | * @param PermissionVoterInterface $permissionVoter |
||
29 | */ |
||
30 | public function __construct( |
||
40 | |||
41 | /** |
||
42 | * @inheritdoc |
||
43 | */ |
||
44 | public function isAuthorized(AuthorizableCommandInterface $command) |
||
58 | } |
||
59 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: