original_string: public function add_filter_by_key( FilterInterface $filter, $key ) {
  
  		if ( ! is_scalar( $key ) ) {
  			throw new Exception\InvalidArgumentException( 'key should be a scalar value.' );
  		}
  
  		$key = (string) $key;
  
  		if ( ! isset ( $this->filters_by_key[ $key ] ) ) {
  			$this->filters_by_key[ $key ] = [ ];
  		}
  
  		$this->filters_by_key[ $key ][] = $filter;
  
  		return $this;
  	}
code: public function add_filter_by_key( FilterInterface $filter, $key ) {
  
  		if ( ! is_scalar( $key ) ) {
  			throw new Exception\InvalidArgumentException( 'key should be a scalar value.' );
  		}
  
  		$key = (string) $key;
  
  		if ( ! isset ( $this->filters_by_key[ $key ] ) ) {
  			$this->filters_by_key[ $key ] = [ ];
  		}
  
  		$this->filters_by_key[ $key ][] = $filter;
  
  		return $this;
  	}
code_tokens: public function add_filter_by_key ( FilterInterface $ filter , $ key ) { if ( ! is_scalar ( $ key ) ) { throw new Exception \ InvalidArgumentException ( 'key should be a scalar value.' ) ; } $ key = ( string ) $ key ; if ( ! isset ( $ this -> filters_by_key [ $ key ] ) ) { $ this -> filters_by_key [ $ key ] = [ ] ; } $ this -> filters_by_key [ $ key ] [ ] = $ filter ; return $ this ; }
docstring: Adding a filter grouped by array key.
  
  @throws Exception\InvalidArgumentException if type of $key is not scalar.
  
  @param FilterInterface    $filter
  @param                    $key
  
  @return ArrayValue
docstring_tokens: Adding a filter grouped by array key .