Add number of sheets as a unit for number of parts

This commit is contained in:
Joshua Ramon Enslin 2025-01-14 11:12:40 +01:00
parent 709a5d5cc3
commit 1b34e49ff8
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
2 changed files with 5 additions and 1 deletions

2
l18n

@ -1 +1 @@
Subproject commit 690f60a307664723c088c8e9d517d9fcaa203a4a
Subproject commit 2619277713a8876a24015d800b843fbe71ae8f47

View File

@ -12,6 +12,7 @@ declare(strict_types = 1);
enum MDCountPartsUnit implements MDValueEnumInterface, JsonSerializable, MDMeasurementUnitInterface {
case parts;
case sheets;
case pages;
/**
@ -26,6 +27,7 @@ enum MDCountPartsUnit implements MDValueEnumInterface, JsonSerializable, MDMeasu
return match($input) {
'parts' => self::parts,
'pages' => self::pages,
'sheets' => self::sheets,
default => throw new MDpageParameterNotFromListException("Unknown parts counting unit"),
};
@ -43,6 +45,7 @@ enum MDCountPartsUnit implements MDValueEnumInterface, JsonSerializable, MDMeasu
return match($input) {
1 => self::parts,
2 => self::pages,
3 => self::sheets,
default => throw new MDpageParameterNotFromListException("Unknown parts counting unit"),
};
@ -80,6 +83,7 @@ enum MDCountPartsUnit implements MDValueEnumInterface, JsonSerializable, MDMeasu
return match($this) {
self::parts => 1,
self::pages => 2,
self::sheets => 3,
# default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
};