Skip to content

Commit

Permalink
Update Runner.php
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed Feb 15, 2024
1 parent 197dbf9 commit 42753c7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions webfiori/cli/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public function __construct() {
$this->afterRunPool = [];

$this->addArg('--ansi', [
'optional' => true,
'description' => 'Force the use of ANSI output.'
Option::OPTIONAL => true,
Option::DESCRIPTION => 'Force the use of ANSI output.'
]);
$this->setBeforeStart(function (Runner $r)
{
Expand Down Expand Up @@ -122,7 +122,7 @@ public function __construct() {
* @since 1.0
*/
public function addArg(string $name, array $options = []) : bool {
$toAdd = CommandArgument::create($name, $options);
$toAdd = Argument::create($name, $options);

if ($toAdd === null) {
return false;
Expand All @@ -136,12 +136,12 @@ public function addArg(string $name, array $options = []) : bool {
* Global arguments are set of arguments that will be added automatically
* to any command which is registered by the runner.
*
* @param CommandArgument $arg An object that holds argument info.
* @param Argument $arg An object that holds argument info.
*
* @return bool If the argument is added, the method will return true.
* Other than that, false is returned.
*/
public function addArgument(CommandArgument $arg) : bool {
public function addArgument(Argument $arg) : bool {
if (!$this->hasArg($arg->getName())) {
$this->globalArgs[] = $arg;

Expand Down

0 comments on commit 42753c7

Please sign in to comment.