original_string: public function setType($type = null)
      {
          $type = $this->calculateTypeValue($type);
  
          if (!is_int($type) || ($type < 0) || ($type > self::ALL)) {
              throw new Exception\InvalidArgumentException('Unknown type');
          }
  
          $this->options['type'] = $type;
  
          return $this;
      }
code: public function setType($type = null)
      {
          $type = $this->calculateTypeValue($type);
  
          if (!is_int($type) || ($type < 0) || ($type > self::ALL)) {
              throw new Exception\InvalidArgumentException('Unknown type');
          }
  
          $this->options['type'] = $type;
  
          return $this;
      }
code_tokens: public function setType ( $ type = null ) { $ type = $ this -> calculateTypeValue ( $ type ) ; if ( ! is_int ( $ type ) || ( $ type < 0 ) || ( $ type > self :: ALL ) ) { throw new Exception \ InvalidArgumentException ( 'Unknown type' ) ; } $ this -> options [ 'type' ] = $ type ; return $ this ; }
docstring: Sets types of values that are to be considered empty.
  
  @param  int|array|null $type
  @throws Exception\InvalidArgumentException
  @return NotEmpty
docstring_tokens: Sets types of values that are to be considered empty .