diff vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 5fb285c0d0e3
children
line wrap: on
line diff
--- a/vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php	Thu Feb 28 13:21:36 2019 +0000
@@ -43,10 +43,10 @@
      */
     public function leaveNode(Node $node)
     {
-        if ($node instanceof ConstFetch && count($node->name->parts) > 1) {
+        if ($node instanceof ConstFetch && \count($node->name->parts) > 1) {
             $name = $this->getFullyQualifiedName($node->name);
-            if (!defined($name)) {
-                $msg = sprintf('Undefined constant %s', $name);
+            if (!\defined($name)) {
+                $msg = \sprintf('Undefined constant %s', $name);
                 throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine());
             }
         } elseif ($node instanceof ClassConstFetch) {
@@ -77,11 +77,11 @@
 
             // if the class doesn't exist, don't throw an exception… it might be
             // defined in the same line it's used or something stupid like that.
-            if (class_exists($className) || interface_exists($className)) {
+            if (\class_exists($className) || \interface_exists($className)) {
                 $refl = new \ReflectionClass($className);
                 if (!$refl->hasConstant($constName)) {
-                    $constType = class_exists($className) ? 'Class' : 'Interface';
-                    $msg = sprintf('%s constant \'%s::%s\' not found', $constType, $className, $constName);
+                    $constType = \class_exists($className) ? 'Class' : 'Interface';
+                    $msg = \sprintf('%s constant \'%s::%s\' not found', $constType, $className, $constName);
                     throw new FatalErrorException($msg, 0, E_ERROR, null, $stmt->getLine());
                 }
             }