Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / class-loader / ClassLoader.php
index 4afcf405854dfe2c7352c64ca19c4942937ec620..52cff3bb4c5f456c7c4fb1f684ef8b8c980a8783 100644 (file)
@@ -95,12 +95,12 @@ class ClassLoader
             return;
         }
         if (isset($this->prefixes[$prefix])) {
-            if (is_array($paths)) {
+            if (\is_array($paths)) {
                 $this->prefixes[$prefix] = array_unique(array_merge(
                     $this->prefixes[$prefix],
                     $paths
                 ));
-            } elseif (!in_array($paths, $this->prefixes[$prefix])) {
+            } elseif (!\in_array($paths, $this->prefixes[$prefix])) {
                 $this->prefixes[$prefix][] = $paths;
             }
         } else {
@@ -174,7 +174,7 @@ class ClassLoader
     {
         if (false !== $pos = strrpos($class, '\\')) {
             // namespaced class name
-            $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)).DIRECTORY_SEPARATOR;
+            $classPath = str_replace('\\', \DIRECTORY_SEPARATOR, substr($class, 0, $pos)).\DIRECTORY_SEPARATOR;
             $className = substr($class, $pos + 1);
         } else {
             // PEAR-like class name
@@ -182,21 +182,21 @@ class ClassLoader
             $className = $class;
         }
 
-        $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className).'.php';
+        $classPath .= str_replace('_', \DIRECTORY_SEPARATOR, $className).'.php';
 
         foreach ($this->prefixes as $prefix => $dirs) {
             if ($class === strstr($class, $prefix)) {
                 foreach ($dirs as $dir) {
-                    if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
-                        return $dir.DIRECTORY_SEPARATOR.$classPath;
+                    if (file_exists($dir.\DIRECTORY_SEPARATOR.$classPath)) {
+                        return $dir.\DIRECTORY_SEPARATOR.$classPath;
                     }
                 }
             }
         }
 
         foreach ($this->fallbackDirs as $dir) {
-            if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
-                return $dir.DIRECTORY_SEPARATOR.$classPath;
+            if (file_exists($dir.\DIRECTORY_SEPARATOR.$classPath)) {
+                return $dir.\DIRECTORY_SEPARATOR.$classPath;
             }
         }