original_string: public function setAdapter($adapter)
      {
          if ($adapter instanceof Compress\CompressionAlgorithmInterface) {
              $this->adapter = $adapter;
              return $this;
          }
          if (!is_string($adapter)) {
              throw new Exception\InvalidArgumentException('Invalid adapter provided; must be string or instance of Zend\\Filter\\Compress\\CompressionAlgorithmInterface');
          }
          $this->adapter = $adapter;
  
          return $this;
      }
code: public function setAdapter($adapter)
      {
          if ($adapter instanceof Compress\CompressionAlgorithmInterface) {
              $this->adapter = $adapter;
              return $this;
          }
          if (!is_string($adapter)) {
              throw new Exception\InvalidArgumentException('Invalid adapter provided; must be string or instance of Zend\\Filter\\Compress\\CompressionAlgorithmInterface');
          }
          $this->adapter = $adapter;
  
          return $this;
      }
code_tokens: public function setAdapter ( $ adapter ) { if ( $ adapter instanceof Compress \ CompressionAlgorithmInterface ) { $ this -> adapter = $ adapter ; return $ this ; } if ( ! is_string ( $ adapter ) ) { throw new Exception \ InvalidArgumentException ( 'Invalid adapter provided; must be string or instance of Zend\\Filter\\Compress\\CompressionAlgorithmInterface' ) ; } $ this -> adapter = $ adapter ; return $ this ; }
docstring: Sets compression adapter
  
  @param  string|Compress\CompressionAlgorithmInterface $adapter Adapter to use
  @return self
  @throws Exception\InvalidArgumentException
docstring_tokens: Sets compression adapter