@@ -109,9 +109,9 @@ protected static function getAttributesNSFromXML(
109109 foreach ($ xml ->attributes as $ a ) {
110110 if (in_array ([$ a ->namespaceURI , $ a ->localName ], $ exclusionList , true )) {
111111 continue ;
112- } elseif ($ namespace === NS ::OTHER && in_array ($ a ->namespaceURI , [self ::NS , null ], true )) {
112+ } elseif ($ namespace === NS ::OTHER && in_array ($ a ->namespaceURI , [static ::NS , null ], true )) {
113113 continue ;
114- } elseif ($ namespace === NS ::TARGETNAMESPACE && $ a ->namespaceURI !== self ::NS ) {
114+ } elseif ($ namespace === NS ::TARGETNAMESPACE && $ a ->namespaceURI !== static ::NS ) {
115115 continue ;
116116 } elseif ($ namespace === NS ::LOCAL && $ a ->namespaceURI !== null ) {
117117 continue ;
@@ -133,7 +133,7 @@ protected static function getAttributesNSFromXML(
133133
134134 // Replace the ##targetedNamespace with the actual namespace
135135 if (($ key = array_search (NS ::TARGETNAMESPACE , $ namespace )) !== false ) {
136- $ namespace [$ key ] = self ::NS ;
136+ $ namespace [$ key ] = static ::NS ;
137137 }
138138
139139 // Replace the ##local with null
@@ -207,7 +207,7 @@ function (Attribute $attr) {
207207
208208 // Replace the ##targetedNamespace with the actual namespace
209209 if (($ key = array_search (NS ::TARGETNAMESPACE , $ allowed_namespaces )) !== false ) {
210- $ allowed_namespaces [$ key ] = self ::NS ;
210+ $ allowed_namespaces [$ key ] = static ::NS ;
211211 }
212212
213213 // Replace the ##local with null
@@ -221,7 +221,7 @@ function (Attribute $attr) {
221221 sprintf (
222222 'Attributes from namespaces [ %s ] are not allowed inside a %s element. ' ,
223223 rtrim (implode (', ' , $ diff )),
224- self ::NS ,
224+ static ::NS ,
225225 ),
226226 );
227227 } else {
@@ -230,10 +230,10 @@ function (Attribute $attr) {
230230 Assert::allNotNull ($ actual_namespaces );
231231
232232 // Must be any namespace other than the parent element
233- Assert::allNotSame ($ actual_namespaces , self ::NS );
233+ Assert::allNotSame ($ actual_namespaces , static ::NS );
234234 } elseif ($ namespace === NS ::TARGETNAMESPACE ) {
235235 // Must be the same namespace as the one of the parent element
236- Assert::allSame ($ actual_namespaces , self ::NS );
236+ Assert::allSame ($ actual_namespaces , static ::NS );
237237 }
238238 }
239239
0 commit comments