You are here

public function InputOption::equals in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/console/Input/InputOption.php \Symfony\Component\Console\Input\InputOption::equals()

Checks whether the given option equals this one.

Parameters

InputOption $option option to compare:

Return value

bool

File

vendor/symfony/console/Input/InputOption.php, line 199

Class

InputOption
Represents a command line option.

Namespace

Symfony\Component\Console\Input

Code

public function equals(InputOption $option) {
  return $option
    ->getName() === $this
    ->getName() && $option
    ->getShortcut() === $this
    ->getShortcut() && $option
    ->getDefault() === $this
    ->getDefault() && $option
    ->isArray() === $this
    ->isArray() && $option
    ->isValueRequired() === $this
    ->isValueRequired() && $option
    ->isValueOptional() === $this
    ->isValueOptional();
}