PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Console » Console_Getargs » Bug #1823

The getHelp() method ignores user-defined header for the helptext

Details

Submitted2004-07-08 10:23 UTC
Fromcontact at jenskleikamp dot de
Assignedscottmattocks
StatusClosed
PackageConsole_Getargs
PHP Version4.3.6
OSx86 Linux
Roadmaps(Not assigned)

Comments

[2004-07-08 10:23 UTC] contact at jenskleikamp dot de

Description:
------------
PEAR Version 1.3.1
Console_Getargs 0.1.0
CVS Version of Getargs.php: 1.1

The public getHelp() method ignores the optional parameter for the header of the help.

Reproduce code:
---------------
#!/usr/bin/php -q
<?php
require_once('Console/Getargs.php');

$config = array('debug' => array('short' => 'd', 'desc' => 'Show current DAO settings'),
'help' => array('short' => 'h', 'desc' => 'Show help information.'));

echo Console_Getargs::getHelp($config, Usage: Foo')."\n";
?>

Expected result:
----------------
bin $ ./getargs_test.php
Usage: Foo

-d --debug Show current DAO Settings
-h --help Show help information.

Actual result:
--------------
bin $ ./getargs_test.php
-d --debug Show current DAO Settings
-h --help Show help information.