Redefine parser signature

This commit is contained in:
Eduardo Gulias Davis
2020-09-12 16:35:38 +02:00
parent 0ba6f87f8e
commit a7ebdba30a
9 changed files with 23 additions and 28 deletions
+3 -3
View File
@@ -31,7 +31,7 @@ class DomainPart extends Parser
*/
protected $domainPart = '';
public function parse($domainPart)
public function parse() : Result
{
$this->lexer->moveNext();
@@ -114,7 +114,7 @@ class DomainPart extends Parser
protected function parseComments()
{
$commentParser = new Comment($this->lexer, new DomainComment());
$result = $commentParser->parse('remove');
$result = $commentParser->parse();
$this->warnings = array_merge($this->warnings, $commentParser->getWarnings());
return $result;
@@ -195,7 +195,7 @@ class DomainPart extends Parser
}
$domainLiteralParser = new DomainLiteralParser($this->lexer);
$result = $domainLiteralParser->parse('remove');
$result = $domainLiteralParser->parse();
$this->warnings = array_merge($this->warnings, $domainLiteralParser->getWarnings());
return $result;
}