Checks whether the given option equals this one.

@param InputOption $option option to compare

@return bool
771340
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()
        ;
    }
866307
public function checkAjaxCheckbox($option)
  {
    $page = $this->getSession()->getPage();
    $element = $page->find('css', "[id^='" . $option . "']");
    $element->check();
  }
1049073
private function isEqual($choice, $givenChoice)
    {
        if ($choice === $givenChoice) {
            return true;
        }

        if ($this->getIdentifierValues($choice) === $this->getIdentifierValues($givenChoice)) {
            return true;
        }

        return false;
    }
299538
public function match($input)
    {
       
        $noMatch = true;
        foreach ($this->matchers as $matcher) {
            if ($matcher->noMatch()) {
                continue;
            }
            if ($matcher->match($input)) {
                $noMatch = false;
            }
            if ($matcher->matchFound()) {
                $this->matched[] = $matcher->matched;
                $this->resetMatchers();
                break;
            }
        }
        if ($noMatch) {
            return false;
        }
        return true;
    }
72195
public boolean hasUniqueLongOption(String optionName) {
        if(hasLongOption(optionName)) {
            for(ProcessedOption o : getOptions()) {
                if(o.name().startsWith(optionName) && !o.name().equals(optionName))
                    return false;
            }
            return true;
        }
        return false;
    }
212018
private function is_site_option( $option ) {
            if ( WP_FS__ACCOUNTS_OPTION_NAME != $this->_id ) {
                return false;
            }

            if ( ! isset( self::$_SITE_OPTIONS_MAP ) ) {
                self::load_site_options_map();
            }

            return isset( self::$_SITE_OPTIONS_MAP[ $option ] );
        }
631760
public static function ensureValid($option)
    {
        if (is_string($option)) {
            $option = strtolower($option);
        }

        if (!self::isValid($option)) {
            $option = is_scalar($option) ? $option : gettype($option);

            $parts = explode('\\', __CLASS__);
            $class = array_pop($parts);

            throw new EnumException(sprintf('"%s" is not a valid %s option.', $option, $class));
        }

        return $option;
    }
46612
public function equals(Type $type) {
        if ($type === $this) {
            return true;
        }
        if ($type->type !== $this->type) {
            return false;
        }
        if ($type->type === Type::TYPE_OBJECT) {
            return strtolower($type->userType) === strtolower($this->userType);
        }
        // TODO: handle sub types
        if (isset(self::$hasSubtypes[$this->type]) && isset(self::$hasSubtypes[$type->type])) {
            if (count($this->subTypes) !== count($type->subTypes)) {
                return false;
            }
            // compare 
            $other = $type->subTypes;
            foreach ($this->subTypes as $st1) {
                foreach ($other as $key => $st2) {
                    if ($st1->equals($st2)) {
                        unset($other[$key]);
                        continue 2;
                    }
                    // We have a subtype that's not equal
                    return false;
                }
            }
            return empty($other);
        }
        return true;
    }
966337
private function getQuestionString(InputOption $option, $default)
    {
        if ('' !== (string) $default) {
            if (stripos($option->getName(), 'password') !== false) {
                return sprintf('%s? [<options=bold>HIDDEN</>]: ', $option->getDescription(), $default);
            }

            return sprintf('%s? [<options=bold>%s</>]: ', $option->getDescription(), $default);
        }

        return sprintf('%s?: ', $option->getDescription());
    }
315413
public function getValueFromInput(InputInterface $input, $normalize = true)
    {
        $optionName = $this->getOptionName();
        if (!$input->hasOption($optionName)) {
            return null;
        }
        $value = $input->getOption($optionName);
        if ($this->isEmpty($value)) {
            return null;
        }
        if ($input->getParameterOption('--' . $optionName) === false && $value === $this->default) {
            return null;
        }

        return $normalize ? $this->normalize($value) : $value;
    }
35708
public function equals($compare)
    {
        if ($compare instanceof self) {
            return ($compare->className === $this->className && $compare->methodName === $this->methodName);
        }
        
        return false;
    }
265429
public function equals($other = null): bool
    {
        if (is_null($other)) {
            return false;
        } else {
            return
                $other instanceof static &&
                $other->getChoiceString() === $this->getChoiceString();
        }
    }
206170
protected function getOption($option, $default = false)
    {
        return isset($this->options[$option])? $this->options[$option] : $default;
    }
241310
protected function _optionExists($name)
    {
        if (substr($name, 0, 2) === '--') {
            return isset($this->_options[substr($name, 2)]);
        }
        if ($name{0} === '-' && $name{1} !== '-') {
            return isset($this->_shortOptions[$name{1}]);
        }

        return false;
    }
720436
private static boolean isBetterOption(BigDecimal bestQuality, Variant best,
                                         BigDecimal optionQuality, Variant option)
   {
      if (best == null)
         return true;
      MediaType bestType = best.getMediaType();
      MediaType optionType = option.getMediaType();
      if (bestType != null && optionType != null)
      {
         if (bestType.getType().equals(optionType.getType()))
         {
            // Same type
            if (bestType.getSubtype().equals(optionType.getSubtype()))
            {
               // Same subtype
               int bestCount = bestType.getParameters().size();
               int optionCount = optionType.getParameters().size();
               if (optionCount > bestCount)
                  return true;   // more matching parameters
               else if (optionCount < bestCount)
                  return false;   // less matching parameters
            }
            else if ("*".equals(bestType.getSubtype()))
            {
               return true;   // more specific subtype
            }
            else if ("*".equals(optionType.getSubtype()))
            {
               return false;   // less specific subtype
            }
         }
         else if ("*".equals(bestType.getType()))
         {
            return true;   // more specific type
         }
         else if ("*".equals(optionType.getType()))
         {
            return false;   // less specific type;
         }
      }

      int signum = bestQuality.compareTo(optionQuality);
      if (signum != 0)
         return signum < 0;
      return getExplicitness(best) < getExplicitness(option);
   }
946116
public function equals($compare): bool
    {
        if ($compare instanceof self) {
            return ($this->name() === $compare->name());
        }

        return false;
    }
1048920
public function assertSelectOptionNotFound($field, $option)
    {
        \PHPUnit_Framework_Assert::assertFalse(
            in_array($option, $this->findSelectOptions($field), true),
            sprintf('The select option "%s" from the select "%s" exists.', $option, $field)
        );
    }