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