| Total Complexity | 7 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | class RouteVoter extends Voter |
||
| 25 | { |
||
| 26 | private ?array $config; |
||
| 27 | private ResourceAccessCheckerInterface $resourceAccessChecker; |
||
| 28 | |||
| 29 | public function __construct(?array $config, ResourceAccessCheckerInterface $resourceAccessChecker) |
||
| 30 | { |
||
| 31 | $this->config = $config; |
||
| 32 | $this->resourceAccessChecker = $resourceAccessChecker; |
||
| 33 | } |
||
| 34 | |||
| 35 | protected function supports($subject, $notRequired): bool |
||
| 36 | { |
||
| 37 | return $subject instanceof Route && $this->config; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param Route $route |
||
| 42 | */ |
||
| 43 | protected function voteOnAttribute($route, $notRequired, TokenInterface $token): bool |
||
| 53 | } |
||
| 54 | } |
||
| 55 |