@@ -95,8 +95,8 @@ public function getAttributesNS(): array
9595 */
9696 protected static function getAttributesNSFromXML (DOMElement $ xml , NS |array $ namespace = null ): array
9797 {
98- $ namespace = $ namespace ?? static ::XS_ANY_ATTR_NAMESPACE ;
99- $ exclusionList = static ::getAttributeExclusions ();
98+ $ namespace = $ namespace ?? self ::XS_ANY_ATTR_NAMESPACE ;
99+ $ exclusionList = self ::getAttributeExclusions ();
100100 $ attributes = [];
101101
102102 // Validate namespace value
@@ -107,9 +107,9 @@ protected static function getAttributesNSFromXML(DOMElement $xml, NS|array $name
107107 foreach ($ xml ->attributes as $ a ) {
108108 if (in_array ([$ a ->namespaceURI , $ a ->localName ], $ exclusionList , true )) {
109109 continue ;
110- } elseif ($ namespace === NS ::OTHER && in_array ($ a ->namespaceURI , [static ::NS , null ], true )) {
110+ } elseif ($ namespace === NS ::OTHER && in_array ($ a ->namespaceURI , [self ::NS , null ], true )) {
111111 continue ;
112- } elseif ($ namespace === NS ::TARGET && $ a ->namespaceURI !== static ::NS ) {
112+ } elseif ($ namespace === NS ::TARGET && $ a ->namespaceURI !== self ::NS ) {
113113 continue ;
114114 } elseif ($ namespace === NS ::LOCAL && $ a ->namespaceURI !== null ) {
115115 continue ;
@@ -126,7 +126,7 @@ protected static function getAttributesNSFromXML(DOMElement $xml, NS|array $name
126126
127127 // Replace the ##targetedNamespace with the actual namespace
128128 if (($ key = array_search (NS ::TARGET , $ namespace )) !== false ) {
129- $ namespace [$ key ] = static ::NS ;
129+ $ namespace [$ key ] = self ::NS ;
130130 }
131131
132132 // Replace the ##local with null
@@ -195,7 +195,7 @@ function (Attribute $attr) {
195195
196196 // Replace the ##targetedNamespace with the actual namespace
197197 if (($ key = array_search (NS ::TARGET , $ allowed_namespaces )) !== false ) {
198- $ allowed_namespaces [$ key ] = static ::NS ;
198+ $ allowed_namespaces [$ key ] = self ::NS ;
199199 }
200200
201201 // Replace the ##local with null
@@ -209,7 +209,7 @@ function (Attribute $attr) {
209209 sprintf (
210210 'Attributes from namespaces [ %s ] are not allowed inside a %s element. ' ,
211211 rtrim (implode (', ' , $ diff )),
212- static ::NS ,
212+ self ::NS ,
213213 ),
214214 );
215215 } else {
@@ -218,14 +218,14 @@ function (Attribute $attr) {
218218 Assert::allNotNull ($ actual_namespaces );
219219
220220 // Must be any namespace other than the parent element
221- Assert::allNotSame ($ actual_namespaces , static ::NS );
221+ Assert::allNotSame ($ actual_namespaces , self ::NS );
222222 } elseif ($ namespace === NS ::TARGET ) {
223223 // Must be the same namespace as the one of the parent element
224- Assert::allSame ($ actual_namespaces , static ::NS );
224+ Assert::allSame ($ actual_namespaces , self ::NS );
225225 }
226226 }
227227
228- $ exclusionList = static ::getAttributeExclusions ();
228+ $ exclusionList = self ::getAttributeExclusions ();
229229 foreach ($ attributes as $ i => $ attr ) {
230230 if (in_array ([$ attr ->getNamespaceURI (), $ attr ->getAttrName ()], $ exclusionList , true )) {
231231 unset($ attributes [$ i ]);
@@ -243,13 +243,13 @@ function (Attribute $attr) {
243243 public function getAttributeNamespace (): array |NS
244244 {
245245 Assert::true (
246- defined ('static ::XS_ANY_ATTR_NAMESPACE ' ),
247- self ::getClassName (static ::class)
246+ defined ('self ::XS_ANY_ATTR_NAMESPACE ' ),
247+ self ::getClassName (self ::class)
248248 . '::XS_ANY_ATTR_NAMESPACE constant must be defined and set to the namespace for the xs:anyAttribute. ' ,
249249 RuntimeException::class,
250250 );
251251
252- return static ::XS_ANY_ATTR_NAMESPACE ;
252+ return self ::XS_ANY_ATTR_NAMESPACE ;
253253 }
254254
255255
@@ -260,8 +260,8 @@ public function getAttributeNamespace(): array|NS
260260 */
261261 public static function getAttributeExclusions (): array
262262 {
263- if (defined ('static ::XS_ANY_ATTR_EXCLUSIONS ' )) {
264- return static ::XS_ANY_ATTR_EXCLUSIONS ;
263+ if (defined ('self ::XS_ANY_ATTR_EXCLUSIONS ' )) {
264+ return self ::XS_ANY_ATTR_EXCLUSIONS ;
265265 }
266266
267267 return [];
0 commit comments