mirror of
https://github.com/n3w/helpers-functions-cli.git
synced 2025-12-19 12:43:22 +00:00
Passing the separator after the array is no longer supported
This commit is contained in:
parent
1992fee96b
commit
cedd316946
1 changed files with 4 additions and 4 deletions
|
|
@ -169,7 +169,7 @@ if (!function_exists(__NAMESPACE__.'usage')) {
|
||||||
: $a->name()
|
: $a->name()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$arguments = trim(implode($arguments, ' '));
|
$arguments = trim(implode(' ', $arguments));
|
||||||
|
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'Usage: %s [OPTIONS]... %s%s',
|
'Usage: %s [OPTIONS]... %s%s',
|
||||||
|
|
@ -217,13 +217,13 @@ if (!function_exists(__NAMESPACE__.'manpage')) {
|
||||||
// Add the arguments, if there are any.
|
// Add the arguments, if there are any.
|
||||||
if (false === empty($arguments)) {
|
if (false === empty($arguments)) {
|
||||||
$sections[] = $heading('Arguments:');
|
$sections[] = $heading('Arguments:');
|
||||||
$sections[] = $colourise(implode($arguments, PHP_EOL)).PHP_EOL;
|
$sections[] = $colourise(implode(PHP_EOL, $arguments)).PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the options, if there are any.
|
// Add the options, if there are any.
|
||||||
if (false === empty($options)) {
|
if (false === empty($options)) {
|
||||||
$sections[] = $heading('Options:');
|
$sections[] = $heading('Options:');
|
||||||
$sections[] = $colourise(implode($options, PHP_EOL)).PHP_EOL;
|
$sections[] = $colourise(implode(PHP_EOL, $options)).PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iterate over all additional items and add them as new sections
|
// Iterate over all additional items and add them as new sections
|
||||||
|
|
@ -232,7 +232,7 @@ if (!function_exists(__NAMESPACE__.'manpage')) {
|
||||||
$sections[] = $colourise($contents).PHP_EOL;
|
$sections[] = $colourise($contents).PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return implode($sections, PHP_EOL);
|
return implode(PHP_EOL, $sections);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue