Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
4 / 4 |
CRAP | |
100.00% |
1 / 1 |
| RequireSignRequestUuid | |
100.00% |
4 / 4 |
|
100.00% |
4 / 4 |
4 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| skipIfAuthenticated | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| redirectIfSignedToValidation | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| allowIdDocs | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | /** |
| 5 | * SPDX-FileCopyrightText: 2020-2024 LibreCode coop and contributors |
| 6 | * SPDX-License-Identifier: AGPL-3.0-or-later |
| 7 | */ |
| 8 | |
| 9 | namespace OCA\Libresign\Middleware\Attribute; |
| 10 | |
| 11 | use Attribute; |
| 12 | |
| 13 | #[Attribute(Attribute::TARGET_METHOD)] |
| 14 | class RequireSignRequestUuid { |
| 15 | public function __construct( |
| 16 | protected bool $skipIfAuthenticated = false, |
| 17 | protected bool $redirectIfSignedToValidation = false, |
| 18 | protected bool $allowIdDocs = false, |
| 19 | ) { |
| 20 | } |
| 21 | |
| 22 | public function skipIfAuthenticated(): bool { |
| 23 | return $this->skipIfAuthenticated; |
| 24 | } |
| 25 | |
| 26 | public function redirectIfSignedToValidation(): bool { |
| 27 | return $this->redirectIfSignedToValidation; |
| 28 | } |
| 29 | |
| 30 | public function allowIdDocs(): bool { |
| 31 | return $this->allowIdDocs; |
| 32 | } |
| 33 | } |