X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fpsy%2Fpsysh%2Fsrc%2FPsy%2FCommand%2FListCommand%2FGlobalVariableEnumerator.php;fp=vendor%2Fpsy%2Fpsysh%2Fsrc%2FPsy%2FCommand%2FListCommand%2FGlobalVariableEnumerator.php;h=0000000000000000000000000000000000000000;hp=d957e9f52ed91a979bb6a50da66fe0d0f26bbf28;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/psy/psysh/src/Psy/Command/ListCommand/GlobalVariableEnumerator.php b/vendor/psy/psysh/src/Psy/Command/ListCommand/GlobalVariableEnumerator.php deleted file mode 100644 index d957e9f52..000000000 --- a/vendor/psy/psysh/src/Psy/Command/ListCommand/GlobalVariableEnumerator.php +++ /dev/null @@ -1,92 +0,0 @@ -getOption('globals')) { - return; - } - - $globals = $this->prepareGlobals($this->getGlobals()); - - if (empty($globals)) { - return; - } - - return array( - 'Global Variables' => $globals, - ); - } - - /** - * Get defined global variables. - * - * @return array - */ - protected function getGlobals() - { - global $GLOBALS; - - $names = array_keys($GLOBALS); - natcasesort($names); - - $ret = array(); - foreach ($names as $name) { - $ret[$name] = $GLOBALS[$name]; - } - - return $ret; - } - - /** - * Prepare formatted global variable array. - * - * @param array $globals - * - * @return array - */ - protected function prepareGlobals($globals) - { - // My kingdom for a generator. - $ret = array(); - - foreach ($globals as $name => $value) { - if ($this->showItem($name)) { - $fname = '$' . $name; - $ret[$fname] = array( - 'name' => $fname, - 'style' => self::IS_GLOBAL, - 'value' => $this->presentRef($value), - ); - } - } - - return $ret; - } -}