Skip to content

Commit

Permalink
[5.2] Command - Added hasArgument() and hasOption()
Browse files Browse the repository at this point in the history
  • Loading branch information
KennedyTedesco committed Jun 8, 2016
1 parent 60eb682 commit 01b6596
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/Illuminate/Console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,28 @@ public function argument($key = null)
return $this->input->getArgument($key);
}

/**
* Returns true if an InputArgument object exists by name or position.
*
* @param string|int $name
* @return bool
*/
public function hasArgument($name)
{
return $this->input->hasArgument($name);
}

/**
* Returns true if an InputOption object exists by name.
*
* @param string $name
* @return bool
*/
public function hasOption($name)
{
return $this->input->hasOption($name);
}

/**
* Get the value of a command option.
*
Expand Down

0 comments on commit 01b6596

Please sign in to comment.