Updated manpage() to work with pointybeard/helpers-cli-input 1.2

This commit is contained in:
Alannah Kearney 2019-06-01 15:02:30 +10:00
commit f605849ee0

View file

@ -108,14 +108,9 @@ if (!function_exists(__NAMESPACE__.'manpage')) {
$arguments[] = (string) $a;
}
foreach ($collection->getTypes() as $type) {
if ('Argument' == $type) {
continue;
}
foreach ($collection->getItemsByType($type) as $o) {
foreach ($collection->getItemsExcludeByType('Argument') as $o) {
$options[] = (string) $o;
}
}
// Add the arguments, if there are any.
if (false === empty($arguments)) {
@ -208,7 +203,7 @@ if (!function_exists(__NAMESPACE__."\display_error_and_exit")) {
$add_background($heading, true),
implode($message, PHP_EOL),
!empty($trace) && count($trace) > 0
? PHP_EOL . sprintf("Trace\r\n==========\r\n%s\r\n", Debug\readable_debug_backtrace($trace))
? PHP_EOL.sprintf("Trace\r\n==========\r\n%s\r\n", Debug\readable_debug_backtrace($trace))
: ''
);