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