Fixing typos
Publish PHP Package / docker (push) Successful in 6s
Details
Publish PHP Package / docker (push) Successful in 6s
Details
This commit is contained in:
parent
c330fda0cf
commit
2802fc0345
|
@ -654,7 +654,7 @@ class mtgMetaService extends mtgMetaUnit implements mtgScope
|
|||
|
||||
function addUserType(mtgUserType $utype)
|
||||
{
|
||||
if($this->hasRPC($utype->getName()))
|
||||
if($this->hasRPC($utype->getName()) || $this->hasUserType($utype->getName()))
|
||||
throw new Exception("Service '{$this->name}' already has type '{$utype->getName()}'");
|
||||
|
||||
$this->user_types[$utype->getName()] = $utype;
|
||||
|
@ -675,7 +675,7 @@ class mtgMetaService extends mtgMetaUnit implements mtgScope
|
|||
function addEvent(mtgMetaStruct $evt)
|
||||
{
|
||||
$this->events[] = $evt;
|
||||
$this->addUserStruct($evt);
|
||||
$this->addUserType($evt);
|
||||
}
|
||||
|
||||
function getEvents() : array
|
||||
|
|
|
@ -358,7 +358,7 @@ class mtgMetaInfoParser2 implements mtgIMetaInfoParser
|
|||
return $values;
|
||||
}
|
||||
|
||||
private function _parseEnum($is_global = true)
|
||||
private function _parseEnum($is_global = true) : mtgMetaEnum
|
||||
{
|
||||
$this->_nextT();
|
||||
$name = $this->_parseDotName();
|
||||
|
@ -694,7 +694,7 @@ class mtgMetaInfoParser2 implements mtgIMetaInfoParser
|
|||
$this->_nextT();
|
||||
}
|
||||
|
||||
private function _parseRPC($is_global = true)
|
||||
private function _parseRPC($is_global = true) : mtgMetaRPC
|
||||
{
|
||||
$this->_nextT();
|
||||
$code = $this->T_value;
|
||||
|
@ -754,7 +754,7 @@ class mtgMetaInfoParser2 implements mtgIMetaInfoParser
|
|||
else if($this->T == self::T_Enum)
|
||||
$service->addUserType($this->_parseEnum(false));
|
||||
else if($this->T == self::T_Event)
|
||||
$service->addUserType($this->_parseEvent());
|
||||
$service->addEvent($this->_parseEvent());
|
||||
else
|
||||
$this->_error("Unsupported type");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue