/** * Get argument by offset or return default. * * @param int $offset Argument offset. * @param callable|mixed $default Default value, if is a callable, will execute it. * * @return null|string Values from argument or user input. */ public function getArgument($offset, $default = null) { $value = $this->io->getArgument($offset); if (!is_null($value)) { return $value; } if (is_callable($default)) { return $default(); } return $default; }