smiley 1 год назад
Родитель
Сommit
f28605c809
2 измененных файлов с 7 добавлено и 7 удалено
  1. 4 4
      src/Output/QRMarkupXML.php
  2. 3 3
      src/Output/qrcode.schema.xsd

+ 4 - 4
src/Output/QRMarkupXML.php

@@ -22,8 +22,8 @@ use function sprintf;
  */
 class QRMarkupXML extends QRMarkup{
 
-	final public const MIME_TYPE  = 'application/xml';
-	protected const    XML_SCHEMA = 'https://raw.githubusercontent.com/chillerlan/php-qrcode/main/src/Output/qrcode.schema.xsd';
+	final public const MIME_TYPE = 'application/xml';
+	final public const SCHEMA    = 'https://raw.githubusercontent.com/chillerlan/php-qrcode/main/src/Output/qrcode.schema.xsd';
 
 	protected DOMDocument $dom;
 
@@ -52,7 +52,7 @@ class QRMarkupXML extends QRMarkup{
 		$root = $this->dom->createElement('qrcode');
 
 		$root->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
-		$root->setAttribute('xsi:noNamespaceSchemaLocation', $this::XML_SCHEMA);
+		$root->setAttribute('xsi:noNamespaceSchemaLocation', $this::SCHEMA);
 		$root->setAttribute('version', $this->matrix->getVersion());
 		$root->setAttribute('eccLevel', $this->matrix->getEccLevel());
 		$root->appendChild($this->createMatrix());
@@ -120,7 +120,7 @@ class QRMarkupXML extends QRMarkup{
 	}
 
 	/**
-	 * Creates a DOM element for single module
+	 * Creates a DOM element for a single module
 	 */
 	protected function module(int $x, int $y, int $M_TYPE):DOMElement|null{
 		$isDark = $this->matrix->isDark($M_TYPE);

+ 3 - 3
src/Output/qrcode.schema.xsd

@@ -36,7 +36,7 @@
 	</xs:element>
 	<xs:element name="matrix">
 		<xs:annotation>
-			<xs:documentation>The matrix holds the encoded data in a 2-dimensional array of modules</xs:documentation>
+			<xs:documentation>The matrix holds the encoded data in a 2-dimensional array of modules.</xs:documentation>
 		</xs:annotation>
 		<xs:complexType>
 			<xs:sequence>
@@ -64,7 +64,7 @@
 			</xs:attribute>
 			<xs:attribute name="quietzoneSize" use="required" type="xs:nonNegativeInteger">
 				<xs:annotation>
-					<xs:documentation>The size of the quiet zone (margin around the QR symbol)</xs:documentation>
+					<xs:documentation>The size of the quiet zone (margin around the QR symbol).</xs:documentation>
 				</xs:annotation>
 			</xs:attribute>
 			<xs:attribute name="size" use="required">
@@ -92,7 +92,7 @@
 	</xs:element>
 	<xs:element name="row">
 		<xs:annotation>
-			<xs:documentation>A row holds an array of modules</xs:documentation>
+			<xs:documentation>A row holds an array of modules.</xs:documentation>
 		</xs:annotation>
 		<xs:complexType>
 			<xs:sequence>