From 42753c7b45ff250bbeaa0d706a850d86f578077b Mon Sep 17 00:00:00 2001 From: Ibrahim BinAlshikh Date: Thu, 15 Feb 2024 14:46:42 -0800 Subject: [PATCH] Update Runner.php --- webfiori/cli/Runner.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webfiori/cli/Runner.php b/webfiori/cli/Runner.php index a360cec..91fea0e 100644 --- a/webfiori/cli/Runner.php +++ b/webfiori/cli/Runner.php @@ -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) { @@ -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; @@ -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;