original_string: public function setAllowedTypes($option, $allowedTypes)
      {
          if ($this->locked) {
              throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.');
          }
  
          if (!isset($this->defined[$option])) {
              throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined))));
          }
  
          $this->allowedTypes[$option] = (array) $allowedTypes;
  
          // Make sure the option is processed
          unset($this->resolved[$option]);
  
          return $this;
      }
code: public function setAllowedTypes($option, $allowedTypes)
      {
          if ($this->locked) {
              throw new AccessException('Allowed types cannot be set from a lazy option or normalizer.');
          }
  
          if (!isset($this->defined[$option])) {
              throw new UndefinedOptionsException(sprintf('The option "%s" does not exist. Defined options are: "%s".', $option, implode('", "', array_keys($this->defined))));
          }
  
          $this->allowedTypes[$option] = (array) $allowedTypes;
  
          // Make sure the option is processed
          unset($this->resolved[$option]);
  
          return $this;
      }
code_tokens: public function setAllowedTypes ( $ option , $ allowedTypes ) { if ( $ this -> locked ) { throw new AccessException ( 'Allowed types cannot be set from a lazy option or normalizer.' ) ; } if ( ! isset ( $ this -> defined [ $ option ] ) ) { throw new UndefinedOptionsException ( sprintf ( 'The option "%s" does not exist. Defined options are: "%s".' , $ option , implode ( '", "' , array_keys ( $ this -> defined ) ) ) ) ; } $ this -> allowedTypes [ $ option ] = ( array ) $ allowedTypes ; // Make sure the option is processed unset ( $ this -> resolved [ $ option ] ) ; return $ this ; }
docstring: Sets allowed types for an option.
  
  Any type for which a corresponding is_<type>() function exists is
  acceptable. Additionally, fully-qualified class or interface names may
  be passed.
  
  @param string          $option       The option name
  @param string|string[] $allowedTypes One or more accepted types
  
  @return $this
  
  @throws UndefinedOptionsException If the option is undefined
  @throws AccessException           If called from a lazy option or normalizer
docstring_tokens: Sets allowed types for an option .