| Total Complexity | 1 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | #[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS)] |
||
| 24 | #[NamedArgumentConstructor()] |
||
| 25 | final class Guarded |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * @Annotation\Attribute(name="permission", type="string") |
||
| 29 | * @type null|string |
||
| 30 | */ |
||
| 31 | public $permission; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @Enum({"notFound", "unauthorized", "forbidden", "badAction", "error"}) |
||
| 35 | * @type string |
||
| 36 | */ |
||
| 37 | public $else; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Error message in case of error. |
||
| 41 | * |
||
| 42 | * @Annotation\Attribute(name="errorMessage", type="string") |
||
| 43 | * @type null|string |
||
| 44 | */ |
||
| 45 | public $errorMessage; |
||
| 46 | |||
| 47 | public function __construct( |
||
| 57 |