X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fpsy%2Fpsysh%2Fsrc%2FCodeCleaner%2FValidConstantPass.php;fp=vendor%2Fpsy%2Fpsysh%2Fsrc%2FCodeCleaner%2FValidConstantPass.php;h=2d5e3e6d9456357a0569e88b43b35a8c72cc679b;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=7134bb2810ef21227811b55d464b05df4daceb7c;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php b/vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php index 7134bb281..2d5e3e6d9 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ValidConstantPass.php @@ -43,10 +43,10 @@ class ValidConstantPass extends NamespaceAwarePass */ 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 @@ class ValidConstantPass extends NamespaceAwarePass // 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()); } }