diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fc4f5a..4952453 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +## v1.0.1 (2025-02-20) + - Minor documentation updates and fixes. + ## v1.0.0 (2025-02-20) - Initial release of `neoncitylights/xml` library. diff --git a/src/Encoding.php b/src/Encoding.php index 0ab8438..e3c8feb 100644 --- a/src/Encoding.php +++ b/src/Encoding.php @@ -3,6 +3,8 @@ namespace Neoncitylights\Xml; /** + * A text encoding of an XML document + * * @see https://www.php.net/manual/en/xml.encoding.php */ enum Encoding: string { diff --git a/src/ErrorCode.php b/src/ErrorCode.php index 0b0de92..238b465 100644 --- a/src/ErrorCode.php +++ b/src/ErrorCode.php @@ -3,6 +3,8 @@ namespace Neoncitylights\Xml; /** + * An error code returned from an XML parser + * * @see https://www.php.net/manual/en/xml.constants.php */ enum ErrorCode: int { diff --git a/src/Option.php b/src/Option.php index a0cbb19..e6ac2a9 100644 --- a/src/Option.php +++ b/src/Option.php @@ -3,6 +3,8 @@ namespace Neoncitylights\Xml; /** + * Options for configuring an XML parser + * * @see https://www.php.net/manual/en/xml.constants.php */ enum Option: int { diff --git a/src/XmlNativeParser.php b/src/XmlNativeParser.php index 6228fd1..3936e83 100644 --- a/src/XmlNativeParser.php +++ b/src/XmlNativeParser.php @@ -4,6 +4,9 @@ use XMLParser; +/** + * A lightweight wrapper around PHP's native XML API. + */ class XmlNativeParser { public readonly XMLParser $parser; @@ -28,7 +31,6 @@ public static function new( ?Encoding $encoding = null ): self { */ public static function newWithNamespace( ?Encoding $encoding = null, - ?string $separator = ':', ): self { return new XmlNativeParser( \xml_parser_create_ns( @@ -135,7 +137,7 @@ public function getCaseFolding(): bool { /** * Retrieve the parser option value of - * `XML_OPTION_SKIP_TAG_START`. + * `XML_OPTION_SKIP_TAGSTART`. */ public function getSkipTagStart(): int { return $this->getOption( Option::SkipTagStart ); @@ -180,7 +182,7 @@ public function setCaseFolding( bool $value ): bool { } /** - * Sets the parser option of `XML_OPTION_SKIP_WHITE`. + * Sets the parser option of `XML_OPTION_SKIP_TAGSTART`. * * @return bool Returns a boolean for whether or not * setting the option was a success. @@ -307,7 +309,7 @@ public function onProcessingInstruction( callable|null $handler ): true { * * Internally calls `xml_set_start_namespace_decl_handler()`. * - * @param (callable(XmlDocumentParser, string): void)|null $handler + * @param (callable(string): void)|null $handler * @return true Always returns true */ public function onStartNamespaceDecl( callable|null $handler ): true {