Making PHPStan happy
Publish PHP Package / docker (push) Successful in 6s Details

This commit is contained in:
Pavel Shevaev 2025-05-13 16:18:15 +03:00
parent 3bcf6c8ad2
commit cc58754db8
2 changed files with 3 additions and 6 deletions

View File

@ -108,17 +108,14 @@ class mtgMetaInfoUnit
public string $file;
public mtgMetaUnit $object;
/**
* @param string|mtgMetaParsedModule $file_or_module
*/
function __construct($file_or_module, mtgMetaUnit $obj)
function __construct(mtgMetaParsedModule|string $file_or_module, mtgMetaUnit $obj)
{
if($file_or_module instanceof mtgMetaParsedModule)
{
$this->module = $file_or_module;
$this->file = $file_or_module->file;
}
else if(is_string($file_or_module))
else
{
$this->module = null;
$this->file = $file_or_module;

View File

@ -90,6 +90,6 @@ assert($u->object->getFields()["id"]->getType() == "EnumStock");
$u = $meta->findUnit("GameService");
assert($u->object instanceof mtgMetaService);
assert($u->object->getRPC("PING") instanceof mtgMetaRPC);
assert($u->object->getRPC("PING")->getName() == "PING");
assert($u->object->findSymbol("DataPing") instanceof mtgMetaStruct);
assert($u->object->findSymbol("ErrorCode") instanceof mtgMetaEnum);