Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
30 | 18 | public function execute($command, callable $next) |
|
31 | { |
||
32 | 18 | if ($this->authorizationChecker->isGranted('handle', $command)) { |
|
33 | 9 | return $next($command); |
|
34 | } |
||
35 | |||
36 | 9 | throw new AccessDeniedException( |
|
37 | 9 | sprintf('The current user is not allowed to handle command of type \'%s\'', get_class($command)) |
|
38 | ); |
||
39 | } |
||
40 | } |
||
42 |