diff vendor/psy/psysh/src/ParserFactory.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
line wrap: on
line diff
--- a/vendor/psy/psysh/src/ParserFactory.php	Thu Feb 28 11:14:44 2019 +0000
+++ b/vendor/psy/psysh/src/ParserFactory.php	Thu Feb 28 13:11:55 2019 +0000
@@ -44,7 +44,7 @@
      */
     public function hasKindsSupport()
     {
-        return class_exists('PhpParser\ParserFactory');
+        return \class_exists('PhpParser\ParserFactory');
     }
 
     /**
@@ -55,7 +55,7 @@
     public function getDefaultKind()
     {
         if ($this->hasKindsSupport()) {
-            return version_compare(PHP_VERSION, '7.0', '>=') ? static::ONLY_PHP7 : static::ONLY_PHP5;
+            return \version_compare(PHP_VERSION, '7.0', '>=') ? static::ONLY_PHP7 : static::ONLY_PHP5;
         }
     }
 
@@ -73,11 +73,11 @@
 
             $kind = $kind ?: $this->getDefaultKind();
 
-            if (!in_array($kind, static::getPossibleKinds())) {
+            if (!\in_array($kind, static::getPossibleKinds())) {
                 throw new \InvalidArgumentException('Unknown parser kind');
             }
 
-            $parser = $originalFactory->create(constant('PhpParser\ParserFactory::' . $kind));
+            $parser = $originalFactory->create(\constant('PhpParser\ParserFactory::' . $kind));
         } else {
             if ($kind !== null) {
                 throw new \InvalidArgumentException('Install PHP Parser v2.x to specify parser kind');