diff vendor/psy/psysh/src/Reflection/ReflectionConstant_.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents c2387f117808
children
line wrap: on
line diff
--- a/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php	Thu Feb 28 13:21:36 2019 +0000
@@ -46,12 +46,12 @@
     {
         $this->name = $name;
 
-        if (!defined($name) && !self::isMagicConstant($name)) {
+        if (!\defined($name) && !self::isMagicConstant($name)) {
             throw new \InvalidArgumentException('Unknown constant: ' . $name);
         }
 
         if (!self::isMagicConstant($name)) {
-            $this->value = @constant($name);
+            $this->value = @\constant($name);
         }
     }
 
@@ -68,7 +68,7 @@
         $refl = new self($name);
         $value = $refl->getValue();
 
-        $str = sprintf('Constant [ %s %s ] { %s }', gettype($value), $refl->getName(), $value);
+        $str = \sprintf('Constant [ %s %s ] { %s }', \gettype($value), $refl->getName(), $value);
 
         if ($return) {
             return $str;
@@ -79,7 +79,7 @@
 
     public static function isMagicConstant($name)
     {
-        return in_array($name, self::$magicConstants);
+        return \in_array($name, self::$magicConstants);
     }
 
     /**
@@ -115,7 +115,7 @@
             return '';
         }
 
-        return preg_replace('/\\\\[^\\\\]+$/', '', $this->name);
+        return \preg_replace('/\\\\[^\\\\]+$/', '', $this->name);
     }
 
     /**
@@ -135,7 +135,7 @@
      */
     public function inNamespace()
     {
-        return strpos($this->name, '\\') !== false;
+        return \strpos($this->name, '\\') !== false;
     }
 
     /**