Making PHPStan happy

This commit is contained in:
Pavel Shevaev 2023-08-16 14:17:23 +03:00
parent 6d46356fc2
commit 94d3f72daf
1 changed files with 4 additions and 4 deletions

View File

@ -289,7 +289,7 @@ function go_type(\mtgType $type, array $tokens = []): string
return "[]$native";
}
else
throw new Exception("Unknown type '$type'");
throw new Exception("Unknown type '{$type->getName()}'");
}
function builtin_type_method_suffix(\mtgBuiltinType $type): string
@ -432,7 +432,7 @@ function field_reset($name, \mtgType $type, array $tokens)
$str .= "self.$name.Reset()";
}
else
throw new Exception("Unknown type '$type'");
throw new Exception("Unknown type '{$type->getName()}'");
return $str;
}
@ -481,7 +481,7 @@ function buf2var($name, $fname, \mtgType $type, $buf, array $tokens = array(), $
$str .= "\n";
}
else
throw new Exception("Unknown type '{$type}'");
throw new Exception("Unknown type '{$type->getName()}'");
return $str;
}
@ -514,7 +514,7 @@ function var2buf($name, $fname, \mtgType $type, $buf, array $tokens = array(), $
$str .= " "._write_op("{$buf}.EndContainer()")."\n";
}
else
throw new Exception("Unknown type '$type'");
throw new Exception("Unknown type '{$type->getName()}'");
return $str;
}