original_string: public function is($type, ...$args)
      {
          if (is_array($type)) {
              $result = array_map([$this, 'is'], $type);
  
              return count(array_filter($result)) > 0;
          }
  
          $type = strtolower($type);
          if (!isset(static::$_detectors[$type])) {
              return false;
          }
          if ($args) {
              return $this->_is($type, $args);
          }
          if (!isset($this->_detectorCache[$type])) {
              $this->_detectorCache[$type] = $this->_is($type, $args);
          }
  
          return $this->_detectorCache[$type];
      }
code: public function is($type, ...$args)
      {
          if (is_array($type)) {
              $result = array_map([$this, 'is'], $type);
  
              return count(array_filter($result)) > 0;
          }
  
          $type = strtolower($type);
          if (!isset(static::$_detectors[$type])) {
              return false;
          }
          if ($args) {
              return $this->_is($type, $args);
          }
          if (!isset($this->_detectorCache[$type])) {
              $this->_detectorCache[$type] = $this->_is($type, $args);
          }
  
          return $this->_detectorCache[$type];
      }
code_tokens: public function is ( $ type , ... $ args ) { if ( is_array ( $ type ) ) { $ result = array_map ( [ $ this , 'is' ] , $ type ) ; return count ( array_filter ( $ result ) ) > 0 ; } $ type = strtolower ( $ type ) ; if ( ! isset ( static :: $ _detectors [ $ type ] ) ) { return false ; } if ( $ args ) { return $ this -> _is ( $ type , $ args ) ; } if ( ! isset ( $ this -> _detectorCache [ $ type ] ) ) { $ this -> _detectorCache [ $ type ] = $ this -> _is ( $ type , $ args ) ; } return $ this -> _detectorCache [ $ type ] ; }
docstring: Check whether or not a Request is a certain type.
  
  Uses the built in detection rules as well as additional rules
  defined with Cake\Http\ServerRequest::addDetector(). Any detector can be called
  as `is($type)` or `is$Type()`.
  
  @param string|array $type The type of request you want to check. If an array
  this method will return true if the request matches any type.
  @param array ...$args List of arguments
  @return bool Whether or not the request is the type you are checking.
docstring_tokens: Check whether or not a Request is a certain type .