Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | public function execute($command, callable $next) |
||
42 | { |
||
43 | if ($this->user->getId() === null) { |
||
44 | throw new NotAuthenticatedException(); |
||
45 | } |
||
46 | |||
47 | if (!$this->user->can($this->permission)) { |
||
48 | throw new InsufficientPermissionsException($this->permission); |
||
49 | } |
||
50 | |||
51 | return $next($command); |
||
52 | } |
||
53 | } |
||
54 |