Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / psy / psysh / src / Command / ListCommand / ConstantEnumerator.php
similarity index 92%
rename from vendor/psy/psysh/src/Psy/Command/ListCommand/ConstantEnumerator.php
rename to vendor/psy/psysh/src/Command/ListCommand/ConstantEnumerator.php
index 88d348d0a119637f71871939ec564d027af3d608..e17d42a07836fc0fc068d28c5e3b8bad7989f3a0 100644 (file)
@@ -3,7 +3,7 @@
 /*
  * This file is part of Psy Shell.
  *
- * (c) 2012-2017 Justin Hileman
+ * (c) 2012-2018 Justin Hileman
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
@@ -43,7 +43,7 @@ class ConstantEnumerator extends Enumerator
         $internal = $input->getOption('internal');
         $category = $input->getOption('category');
 
-        $ret = array();
+        $ret = [];
 
         if ($user) {
             $ret['User Constants'] = $this->getConstants('user');
@@ -62,7 +62,7 @@ class ConstantEnumerator extends Enumerator
             $ret['Constants'] = $this->getConstants();
         }
 
-        return array_map(array($this, 'prepareConstants'), array_filter($ret));
+        return array_map([$this, 'prepareConstants'], array_filter($ret));
     }
 
     /**
@@ -89,7 +89,7 @@ class ConstantEnumerator extends Enumerator
             return call_user_func_array('array_merge', $consts);
         }
 
-        return isset($consts[$category]) ? $consts[$category] : array();
+        return isset($consts[$category]) ? $consts[$category] : [];
     }
 
     /**
@@ -102,18 +102,18 @@ class ConstantEnumerator extends Enumerator
     protected function prepareConstants(array $constants)
     {
         // My kingdom for a generator.
-        $ret = array();
+        $ret = [];
 
         $names = array_keys($constants);
         natcasesort($names);
 
         foreach ($names as $name) {
             if ($this->showItem($name)) {
-                $ret[$name] = array(
+                $ret[$name] = [
                     'name'  => $name,
                     'style' => self::IS_CONSTANT,
                     'value' => $this->presentRef($constants[$name]),
-                );
+                ];
             }
         }