Add number of sheets as a unit for number of parts
This commit is contained in:
parent
709a5d5cc3
commit
1b34e49ff8
2
l18n
2
l18n
@ -1 +1 @@
|
|||||||
Subproject commit 690f60a307664723c088c8e9d517d9fcaa203a4a
|
Subproject commit 2619277713a8876a24015d800b843fbe71ae8f47
|
@ -12,6 +12,7 @@ declare(strict_types = 1);
|
|||||||
enum MDCountPartsUnit implements MDValueEnumInterface, JsonSerializable, MDMeasurementUnitInterface {
|
enum MDCountPartsUnit implements MDValueEnumInterface, JsonSerializable, MDMeasurementUnitInterface {
|
||||||
|
|
||||||
case parts;
|
case parts;
|
||||||
|
case sheets;
|
||||||
case pages;
|
case pages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,6 +27,7 @@ enum MDCountPartsUnit implements MDValueEnumInterface, JsonSerializable, MDMeasu
|
|||||||
return match($input) {
|
return match($input) {
|
||||||
'parts' => self::parts,
|
'parts' => self::parts,
|
||||||
'pages' => self::pages,
|
'pages' => self::pages,
|
||||||
|
'sheets' => self::sheets,
|
||||||
default => throw new MDpageParameterNotFromListException("Unknown parts counting unit"),
|
default => throw new MDpageParameterNotFromListException("Unknown parts counting unit"),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -43,6 +45,7 @@ enum MDCountPartsUnit implements MDValueEnumInterface, JsonSerializable, MDMeasu
|
|||||||
return match($input) {
|
return match($input) {
|
||||||
1 => self::parts,
|
1 => self::parts,
|
||||||
2 => self::pages,
|
2 => self::pages,
|
||||||
|
3 => self::sheets,
|
||||||
default => throw new MDpageParameterNotFromListException("Unknown parts counting unit"),
|
default => throw new MDpageParameterNotFromListException("Unknown parts counting unit"),
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -80,6 +83,7 @@ enum MDCountPartsUnit implements MDValueEnumInterface, JsonSerializable, MDMeasu
|
|||||||
return match($this) {
|
return match($this) {
|
||||||
self::parts => 1,
|
self::parts => 1,
|
||||||
self::pages => 2,
|
self::pages => 2,
|
||||||
|
self::sheets => 3,
|
||||||
# default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
|
# default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user