diff --git a/XmlParser.php b/XmlParser.php index a050254..20ba6ac 100644 --- a/XmlParser.php +++ b/XmlParser.php @@ -25,7 +25,7 @@ class XmlParser { * * @var int */ - const OPTION_CASE_FOLDING = XML_OPTION_CASE_FOLDING; + public const OPTION_CASE_FOLDING = XML_OPTION_CASE_FOLDING; /** * Specify how many characters should be skipped in the beginning of a tag name. @@ -34,7 +34,7 @@ class XmlParser { * * @var int */ - const OPTION_SKIP_TAGSTART = XML_OPTION_SKIP_TAGSTART; + public const OPTION_SKIP_TAGSTART = XML_OPTION_SKIP_TAGSTART; /** * Whether to skip values consisting of whitespace characters. @@ -43,7 +43,7 @@ class XmlParser { * * @var string */ - const OPTION_SKIP_WHITE = XML_OPTION_SKIP_WHITE; + public const OPTION_SKIP_WHITE = XML_OPTION_SKIP_WHITE; /** * Sets which target encoding to use in this XML parser. By default, it is set to the same as the @@ -53,7 +53,7 @@ class XmlParser { * * @var string */ - const OPTION_TARGET_ENCODING = XML_OPTION_TARGET_ENCODING; + public const OPTION_TARGET_ENCODING = XML_OPTION_TARGET_ENCODING; /** @var BaseParser */ private BaseParser $parser; @@ -238,8 +238,13 @@ private function handleProcessingInstruction(BaseParser $parser, string $target, * @param string $systemId * @param string $publicId */ - private function handleNotationDeclaration(BaseParser $parser, string $notationName, string $base, string $systemId, - string $publicId): void { + private function handleNotationDeclaration( + BaseParser $parser, + string $notationName, + string $base, + string $systemId, + string $publicId + ): void { /** @var XmlParserVisitorInterface $visitor */ foreach ($this->visitors as $visitor) { $visitor->visitNotationDeclaration($notationName, $base, $systemId, $publicId, $this->getCurrentLineNumber(), $this->getCurrentColumnNumber()); @@ -256,8 +261,14 @@ private function handleNotationDeclaration(BaseParser $parser, string $notationN * @param string $publicId * @param string $notationName */ - private function handleUnparsedEntitiyDeclaration(BaseParser $parser, string $entityName, string $base, string $systemId, - string $publicId, string $notationName): void { + private function handleUnparsedEntitiyDeclaration( + BaseParser $parser, + string $entityName, + string $base, + string $systemId, + string $publicId, + string $notationName + ): void { /** @var XmlParserVisitorInterface $visitor */ foreach ($this->visitors as $visitor) { $visitor->visitUnparsedEntityDeclaration($entityName, $base, $systemId, $publicId, $notationName, $this->getCurrentLineNumber(), $this->getCurrentColumnNumber()); diff --git a/XmlParserNoopVisitor.php b/XmlParserNoopVisitor.php index 5c2950f..82f3ae2 100644 --- a/XmlParserNoopVisitor.php +++ b/XmlParserNoopVisitor.php @@ -36,8 +36,14 @@ public function visitProcessingInstruction(string $target, string $data, int $li * @param int $line * @param int $column */ - public function visitNotationDeclaration(string $notationName, string $base, string $systemId, string $publicId, - int $line, int $column): void { + public function visitNotationDeclaration( + string $notationName, + string $base, + string $systemId, + string $publicId, + int $line, + int $column + ): void { } /** @@ -49,8 +55,15 @@ public function visitNotationDeclaration(string $notationName, string $base, str * @param int $line * @param int $column */ - public function visitUnparsedEntityDeclaration(string $entityName, string $base, string $systemId, string $publicId, - string $notationName, int $line, int $column): void { + public function visitUnparsedEntityDeclaration( + string $entityName, + string $base, + string $systemId, + string $publicId, + string $notationName, + int $line, + int $column + ): void { } /** diff --git a/XmlParserVisitorInterface.php b/XmlParserVisitorInterface.php index 2df5aa8..13ce1d9 100644 --- a/XmlParserVisitorInterface.php +++ b/XmlParserVisitorInterface.php @@ -59,8 +59,14 @@ public function visitProcessingInstruction(string $target, string $data, int $li * @param int $line line number * @param int $column column number */ - public function visitNotationDeclaration(string $notationName, string $base, string $systemId, string $publicId, - int $line, int $column): void; + public function visitNotationDeclaration( + string $notationName, + string $base, + string $systemId, + string $publicId, + int $line, + int $column + ): void; /** * visits an unparsed entity declaration @@ -73,6 +79,13 @@ public function visitNotationDeclaration(string $notationName, string $base, str * @param int $line line number * @param int $column column number */ - public function visitUnparsedEntityDeclaration(string $entityName, string $base, string $systemId, - string $publicId, string $notationName, int $line, int $column): void; + public function visitUnparsedEntityDeclaration( + string $entityName, + string $base, + string $systemId, + string $publicId, + string $notationName, + int $line, + int $column + ): void; }