Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
80.00% |
4 / 5 |
|
80.00% |
4 / 5 |
CRAP | |
0.00% |
0 / 1 |
| SignatureRejectedEvent | |
80.00% |
4 / 5 |
|
80.00% |
4 / 5 |
5.20 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getLibreSignFile | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getSignRequest | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getIdentifyMethod | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| wasWorkflowCanceled | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | /** |
| 5 | * SPDX-FileCopyrightText: 2026 LibreCode coop and contributors |
| 6 | * SPDX-License-Identifier: AGPL-3.0-or-later |
| 7 | */ |
| 8 | |
| 9 | namespace OCA\Libresign\Events; |
| 10 | |
| 11 | use OCA\Libresign\Db\File as FileEntity; |
| 12 | use OCA\Libresign\Db\SignRequest; |
| 13 | use OCA\Libresign\Service\IdentifyMethod\IIdentifyMethod; |
| 14 | use OCP\EventDispatcher\Event; |
| 15 | |
| 16 | class SignatureRejectedEvent extends Event { |
| 17 | public const SIGNATURE_REJECTED = 'libresign_signature_rejected'; |
| 18 | |
| 19 | public function __construct( |
| 20 | private SignRequest $signRequest, |
| 21 | private FileEntity $libreSignFile, |
| 22 | private IIdentifyMethod $identifyMethod, |
| 23 | private bool $workflowCanceled, |
| 24 | ) { |
| 25 | } |
| 26 | |
| 27 | public function getLibreSignFile(): FileEntity { |
| 28 | return $this->libreSignFile; |
| 29 | } |
| 30 | |
| 31 | public function getSignRequest(): SignRequest { |
| 32 | return $this->signRequest; |
| 33 | } |
| 34 | |
| 35 | public function getIdentifyMethod(): IIdentifyMethod { |
| 36 | return $this->identifyMethod; |
| 37 | } |
| 38 | |
| 39 | public function wasWorkflowCanceled(): bool { |
| 40 | return $this->workflowCanceled; |
| 41 | } |
| 42 | } |