| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class AuthorizationMiddleware |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var AuthorizationInterface |
||
| 16 | */ |
||
| 17 | protected $authorization; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * AuthorizationMiddleware constructor. |
||
| 21 | * |
||
| 22 | * @param AuthorizationInterface $authorization |
||
| 23 | */ |
||
| 24 | 4 | public function __construct(AuthorizationInterface $authorization) |
|
| 27 | 4 | } |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Apply the authorization headers to the request. |
||
| 31 | * |
||
| 32 | * @param RequestInterface $request |
||
| 33 | * |
||
| 34 | * @return RequestInterface |
||
| 35 | * @throws AuthorizationException |
||
| 36 | */ |
||
| 37 | 4 | public function __invoke(RequestInterface $request) |
|
| 42 |