| Total Complexity | 2 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | class ForbiddenException extends Exception |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * {@inheritDoc} |
||
| 28 | */ |
||
| 29 | protected $code = 403; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * {@inheritDoc} |
||
| 33 | */ |
||
| 34 | protected $messageTemplate = 'Identity is not authorized to perform `%s` on `%s`.'; |
||
| 35 | /** |
||
| 36 | * Policy check result. |
||
| 37 | * |
||
| 38 | * @var \Phauthentic\Authorization\Policy\ResultInterface|null |
||
| 39 | */ |
||
| 40 | protected $result; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Returns policy check result if passed to the exception. |
||
| 44 | * |
||
| 45 | * @param \Phauthentic\Authorization\Policy\ResultInterface|null $result Result |
||
| 46 | * @return $this |
||
| 47 | */ |
||
| 48 | public function setResult(?ResultInterface $result) |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Returns policy check result if passed to the exception. |
||
| 57 | * |
||
| 58 | * @return \Phauthentic\Authorization\Policy\ResultInterface|null |
||
| 59 | */ |
||
| 60 | public function getResult(): ?ResultInterface |
||
| 65 |