Fix return types
This commit is contained in:
@@ -38,13 +38,13 @@ enum MDTranscriptionStatus implements MDValueEnumInterface, JsonSerializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a value of this type based on an integer.
|
* Returns a value of this status based on an integer.
|
||||||
*
|
*
|
||||||
* @param integer $input Input to get a value from.
|
* @param integer $input Input to get a value from.
|
||||||
*
|
*
|
||||||
* @return MDMeasurementType
|
* @return MDTranscriptionStatus
|
||||||
*/
|
*/
|
||||||
public static function fromInt(int $input):MDMeasurementType {
|
public static function fromInt(int $input):MDTranscriptionStatus {
|
||||||
|
|
||||||
return match($input) {
|
return match($input) {
|
||||||
1 => self::incomplete,
|
1 => self::incomplete,
|
||||||
@@ -88,7 +88,7 @@ enum MDTranscriptionStatus implements MDValueEnumInterface, JsonSerializable {
|
|||||||
self::rough_draft => 3,
|
self::rough_draft => 3,
|
||||||
self::quality_control_failed => 4,
|
self::quality_control_failed => 4,
|
||||||
self::quality_control_passed => 5,
|
self::quality_control_passed => 5,
|
||||||
# default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
|
# default => throw new MDpageParameterNotFromListException("Unknown transcription type"),
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -42,9 +42,9 @@ enum MDTranscriptionType implements MDValueEnumInterface, JsonSerializable {
|
|||||||
*
|
*
|
||||||
* @param integer $input Input to get a value from.
|
* @param integer $input Input to get a value from.
|
||||||
*
|
*
|
||||||
* @return MDMeasurementType
|
* @return MDTranscriptionType
|
||||||
*/
|
*/
|
||||||
public static function fromInt(int $input):MDMeasurementType {
|
public static function fromInt(int $input):MDTranscriptionType {
|
||||||
|
|
||||||
return match($input) {
|
return match($input) {
|
||||||
1 => self::simple_transcription,
|
1 => self::simple_transcription,
|
||||||
@@ -88,7 +88,7 @@ enum MDTranscriptionType implements MDValueEnumInterface, JsonSerializable {
|
|||||||
self::critical_edition => 3,
|
self::critical_edition => 3,
|
||||||
self::historical_critical_edition => 4,
|
self::historical_critical_edition => 4,
|
||||||
self::reading_edition => 5,
|
self::reading_edition => 5,
|
||||||
# default => throw new MDpageParameterNotFromListException("Unknown measurement type"),
|
# default => throw new MDpageParameterNotFromListException("Unknown TranscriptionTypee"),
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user