File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,18 +94,10 @@ public function getUserId(): string {
9494 return $ metadata ['deleted_account ' ]['account ' ] ?? $ this ->userId ?? '' ;
9595 }
9696
97- /**
98- * Get signature flow as enum
99- * @return \OCA\Libresign\Enum\SignatureFlow
100- */
10197 public function getSignatureFlowEnum (): \OCA \Libresign \Enum \SignatureFlow {
10298 return \OCA \Libresign \Enum \SignatureFlow::fromNumeric ($ this ->signatureFlow );
10399 }
104100
105- /**
106- * Set signature flow from enum
107- * @param \OCA\Libresign\Enum\SignatureFlow $flow
108- */
109101 public function setSignatureFlowEnum (\OCA \Libresign \Enum \SignatureFlow $ flow ): void {
110102 $ this ->setSignatureFlow ($ flow ->toNumeric ());
111103 }
Original file line number Diff line number Diff line change @@ -16,23 +16,13 @@ enum SignatureFlow: string {
1616 case PARALLEL = 'parallel ' ;
1717 case ORDERED_NUMERIC = 'ordered_numeric ' ;
1818
19- /**
20- * Convert enum to numeric value for database storage
21- * @return int 1 for PARALLEL, 2 for ORDERED_NUMERIC
22- */
2319 public function toNumeric (): int {
2420 return match ($ this ) {
2521 self ::PARALLEL => 1 ,
2622 self ::ORDERED_NUMERIC => 2 ,
2723 };
2824 }
2925
30- /**
31- * Create enum from numeric database value
32- * @param int $value 1 for PARALLEL, 2 for ORDERED_NUMERIC
33- * @return self
34- * @throws \ValueError if value is invalid
35- */
3626 public static function fromNumeric (int $ value ): self {
3727 return match ($ value ) {
3828 1 => self ::PARALLEL ,
You can’t perform that action at this time.
0 commit comments