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