original_string: public function setOutput($output)
      {
          $prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper;
  
          if (\is_callable($output)) {
              $this->outputStream = null;
              $this->lineDumper = $output;
          } else {
              if (\is_string($output)) {
                  $output = fopen($output, 'wb');
              }
              $this->outputStream = $output;
              $this->lineDumper = [$this, 'echoLine'];
          }
  
          return $prev;
      }
code: public function setOutput($output)
      {
          $prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper;
  
          if (\is_callable($output)) {
              $this->outputStream = null;
              $this->lineDumper = $output;
          } else {
              if (\is_string($output)) {
                  $output = fopen($output, 'wb');
              }
              $this->outputStream = $output;
              $this->lineDumper = [$this, 'echoLine'];
          }
  
          return $prev;
      }
code_tokens: public function setOutput ( $ output ) { $ prev = null !== $ this -> outputStream ? $ this -> outputStream : $ this -> lineDumper ; if ( \ is_callable ( $ output ) ) { $ this -> outputStream = null ; $ this -> lineDumper = $ output ; } else { if ( \ is_string ( $ output ) ) { $ output = fopen ( $ output , 'wb' ) ; } $ this -> outputStream = $ output ; $ this -> lineDumper = [ $ this , 'echoLine' ] ; } return $ prev ; }
docstring: Sets the output destination of the dumps.
  
  @param callable|resource|string $output A line dumper callable, an opened stream or an output path
  
  @return callable|resource|string The previous output destination
docstring_tokens: Sets the output destination of the dumps .