| 1 | <?php |
||
| 13 | class FeatureSecurity |
||
| 14 | { |
||
| 15 | protected $context; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param \Symfony\Component\Security\Core\SecurityContextInterface $context |
||
| 19 | */ |
||
| 20 | 4 | public function __construct(SecurityContextInterface $context = null) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @param \Ae\FeatureBundle\Entity\Feature $feature |
||
| 27 | * |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | 4 | public function isGranted(Feature $feature) |
|
| 54 | } |
||
| 55 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: