original_string: public function shutdown($graceful = false)
      {
          $cmd = ($graceful) ? 'shutdown graceful' : 'shutdown';
          $this->sendCommand($cmd);
          $res = fgets($this->conn, 4096);
          $this->checkForError($res);
  
          $this->shutdown = (trim($res) == 'OK');
  
          return $this->shutdown;
      }
code: public function shutdown($graceful = false)
      {
          $cmd = ($graceful) ? 'shutdown graceful' : 'shutdown';
          $this->sendCommand($cmd);
          $res = fgets($this->conn, 4096);
          $this->checkForError($res);
  
          $this->shutdown = (trim($res) == 'OK');
  
          return $this->shutdown;
      }
code_tokens: public function shutdown ( $ graceful = false ) { $ cmd = ( $ graceful ) ? 'shutdown graceful' : 'shutdown' ; $ this -> sendCommand ( $ cmd ) ; $ res = fgets ( $ this -> conn , 4096 ) ; $ this -> checkForError ( $ res ) ; $ this -> shutdown = ( trim ( $ res ) == 'OK' ) ; return $ this -> shutdown ; }
docstring: Shut down Gearman.
  
  @param bool $graceful Whether it should be a graceful shutdown
  
  @return bool
  
  @see MHlavac\Gearman\Manager::sendCommand()
  @see MHlavac\Gearman\Manager::checkForError()
  @see MHlavac\Gearman\Manager::$shutdown
docstring_tokens: Shut down Gearman .