original_string: public function setRequirement($key, $regex)
      {
          $this->requirements[$key] = $this->sanitizeRequirement($key, $regex);
          $this->compiled = null;
  
          return $this;
      }
code: public function setRequirement($key, $regex)
      {
          $this->requirements[$key] = $this->sanitizeRequirement($key, $regex);
          $this->compiled = null;
  
          return $this;
      }
code_tokens: public function setRequirement ( $ key , $ regex ) { $ this -> requirements [ $ key ] = $ this -> sanitizeRequirement ( $ key , $ regex ) ; $ this -> compiled = null ; return $ this ; }
docstring: Sets a requirement for the given key.
  
  @param string $key   The key
  @param string $regex The regex
  
  @return $this
docstring_tokens: Sets a requirement for the given key .