Fix return types

This commit is contained in:
Joshua Ramon Enslin 2022-12-30 05:11:41 +01:00
parent 91a3ee9c6b
commit 59e85ac02c
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ enum MDCustomReportFormat implements JsonSerializable {
*
* @return MDCustomReportTarget
*/
public static function fromString(string $input):MDObjectDamageType {
public static function fromString(string $input):MDCustomReportFormat {
return match($input) {
'csv' => self::csv,

View File

@ -21,12 +21,12 @@ enum MDCustomReportTarget implements MDValueEnumInterface, JsonSerializable {
*
* @return MDCustomReportTarget
*/
public static function fromString(string $input):MDObjectDamageType {
public static function fromString(string $input):MDCustomReportTarget {
return match($input) {
'object_single' => self::object_single,
'object_list' => self::object_list,
default => throw new MDpageParameterNotFromListException("Unknown custom report target"),
default => throw new MDpageParameterNotFromListException("Unknown custom report target: " . $input),
};
}