@@ -41,7 +41,7 @@ public function __construct($xsd)
4141 // replace first only
4242 $ needle = 'http://www.w3.org/2001/xml.xsd ' ;
4343 if (false !== $ pos = strpos ($ xsd , $ needle )) {
44- $ xsd = substr_replace ($ xsd , 'file:/// ' .str_replace ('\\' , '/ ' , __DIR__ ).'/xml.xsd ' , $ pos , strlen ($ needle ));
44+ $ xsd = substr_replace ($ xsd , 'file:/// ' .str_replace ('\\' , '/ ' , __DIR__ ).'/xml.xsd ' , $ pos , \ strlen ($ needle ));
4545 }
4646
4747 $ this ->xsd = $ xsd ;
@@ -60,16 +60,16 @@ public function toString(): string
6060 */
6161 protected function failureDescription ($ other ): string
6262 {
63- if (is_string ($ other )) {
63+ if (\ is_string ($ other )) {
6464 return sprintf ("%s %s. \n%s " , $ other , $ this ->toString (), implode ("\n" , $ this ->xmlConstraintErrors ));
6565 }
6666
67- if (is_object ($ other )) {
68- $ type = sprintf ('%s#%s ' , get_class ($ other ), method_exists ($ other , '__toString ' ) ? $ other ->__toString () : '' );
67+ if (\ is_object ($ other )) {
68+ $ type = sprintf ('%s#%s ' , \ get_class ($ other ), method_exists ($ other , '__toString ' ) ? $ other ->__toString () : '' );
6969 } elseif (null === $ other ) {
7070 $ type = 'null ' ;
7171 } else {
72- $ type = gettype ($ other ).'# ' .$ other ;
72+ $ type = \ gettype ($ other ).'# ' .$ other ;
7373 }
7474
7575 return $ type .' ' .$ this ->toString ();
@@ -80,7 +80,7 @@ protected function failureDescription($other): string
8080 */
8181 protected function matches ($ other ): bool
8282 {
83- return is_string ($ other )
83+ return \ is_string ($ other )
8484 ? $ this ->stringMatches ($ other )
8585 : false
8686 ;
@@ -101,7 +101,7 @@ private function stringMatches($other)
101101 $ dom ->preserveWhiteSpace = false ;
102102 $ dom ->validateOnParse = true ;
103103
104- if (!@$ dom ->loadXML ($ other , LIBXML_NONET | (defined ('LIBXML_COMPACT ' ) ? LIBXML_COMPACT : 0 ))) {
104+ if (!@$ dom ->loadXML ($ other , LIBXML_NONET | (\ defined ('LIBXML_COMPACT ' ) ? LIBXML_COMPACT : 0 ))) {
105105 libxml_disable_entity_loader ($ disableEntities );
106106 $ this ->setXMLConstraintErrors ();
107107 libxml_clear_errors ();
0 commit comments