Security update for Core, with self-updated composer
[yaffs-website] / vendor / psy / psysh / src / Psy / Command / ListCommand / MethodEnumerator.php
index 43867b965687f576d6e501a984cfa955ab2f7b2c..963761cfce6925c353c65b66d9a382356dda6f30 100644 (file)
@@ -39,9 +39,9 @@ class MethodEnumerator extends Enumerator
             return;
         }
 
-        $showAll = $input->getOption('all');
+        $showAll   = $input->getOption('all');
         $noInherit = $input->getOption('no-inherit');
-        $methods = $this->prepareMethods($this->getMethods($showAll, $reflector, $noInherit));
+        $methods   = $this->prepareMethods($this->getMethods($showAll, $reflector, $noInherit));
 
         if (empty($methods)) {
             return;
@@ -77,8 +77,9 @@ class MethodEnumerator extends Enumerator
             }
         }
 
-        // @todo this should be natcasesort
-        ksort($methods);
+        // @todo switch to ksort after we drop support for 5.3:
+        //     ksort($methods, SORT_NATURAL | SORT_FLAG_CASE);
+        uksort($methods, 'strnatcasecmp');
 
         return $methods;
     }