Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / psy / psysh / src / Command / ListCommand / ClassConstantEnumerator.php
index 66d75d0efc8433e0f3700dda1e3b7e4f48115fc7..a1d82ead652fddea573f1fb543678f901e066d2e 100644 (file)
@@ -11,7 +11,7 @@
 
 namespace Psy\Command\ListCommand;
 
-use Psy\Reflection\ReflectionConstant;
+use Psy\Reflection\ReflectionClassConstant;
 use Symfony\Component\Console\Input\InputInterface;
 
 /**
@@ -68,7 +68,7 @@ class ClassConstantEnumerator extends Enumerator
 
         $constants = [];
         foreach ($reflector->getConstants() as $name => $constant) {
-            $constReflector = new ReflectionConstant($reflector, $name);
+            $constReflector = ReflectionClassConstant::create($reflector->name, $name);
 
             if ($noInherit && $constReflector->getDeclaringClass()->getName() !== $className) {
                 continue;
@@ -77,7 +77,7 @@ class ClassConstantEnumerator extends Enumerator
             $constants[$name] = $constReflector;
         }
 
-        ksort($constants, SORT_NATURAL | SORT_FLAG_CASE);
+        \ksort($constants, SORT_NATURAL | SORT_FLAG_CASE);
 
         return $constants;
     }
@@ -118,7 +118,7 @@ class ClassConstantEnumerator extends Enumerator
     {
         if ($reflector->isInterface()) {
             return 'Interface Constants';
-        } elseif (method_exists($reflector, 'isTrait') && $reflector->isTrait()) {
+        } elseif (\method_exists($reflector, 'isTrait') && $reflector->isTrait()) {
             return 'Trait Constants';
         } else {
             return 'Class Constants';