mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 07:09:56 +00:00
CraftingManagerFromDataHelper: Fix parameter name typo (#5870)
due to named parameters, this change must target PM6
This commit is contained in:
parent
f2f30143b0
commit
74cfd687d7
@ -152,10 +152,10 @@ final class CraftingManagerFromDataHelper{
|
|||||||
* @return mixed[]
|
* @return mixed[]
|
||||||
*
|
*
|
||||||
* @phpstan-template TData of object
|
* @phpstan-template TData of object
|
||||||
* @phpstan-param class-string<TData> $modelCLass
|
* @phpstan-param class-string<TData> $modelClass
|
||||||
* @phpstan-return list<TData>
|
* @phpstan-return list<TData>
|
||||||
*/
|
*/
|
||||||
public static function loadJsonArrayOfObjectsFile(string $filePath, string $modelCLass) : array{
|
public static function loadJsonArrayOfObjectsFile(string $filePath, string $modelClass) : array{
|
||||||
$recipes = json_decode(Filesystem::fileGetContents($filePath));
|
$recipes = json_decode(Filesystem::fileGetContents($filePath));
|
||||||
if(!is_array($recipes)){
|
if(!is_array($recipes)){
|
||||||
throw new SavedDataLoadingException("$filePath root should be an array, got " . get_debug_type($recipes));
|
throw new SavedDataLoadingException("$filePath root should be an array, got " . get_debug_type($recipes));
|
||||||
@ -166,7 +166,7 @@ final class CraftingManagerFromDataHelper{
|
|||||||
$mapper->bExceptionOnUndefinedProperty = true;
|
$mapper->bExceptionOnUndefinedProperty = true;
|
||||||
$mapper->bExceptionOnMissingData = true;
|
$mapper->bExceptionOnMissingData = true;
|
||||||
|
|
||||||
return self::loadJsonObjectListIntoModel($mapper, $modelCLass, $recipes);
|
return self::loadJsonObjectListIntoModel($mapper, $modelClass, $recipes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user