original_string: public function appendRow($row): self
      {
          if (!$this->output instanceof ConsoleSectionOutput) {
              throw new RuntimeException(sprintf('Output should be an instance of "%s" when calling "%s".', ConsoleSectionOutput::class, __METHOD__));
          }
  
          if ($this->rendered) {
              $this->output->clear($this->calculateRowCount());
          }
  
          $this->addRow($row);
          $this->render();
  
          return $this;
      }
code: public function appendRow($row): self
      {
          if (!$this->output instanceof ConsoleSectionOutput) {
              throw new RuntimeException(sprintf('Output should be an instance of "%s" when calling "%s".', ConsoleSectionOutput::class, __METHOD__));
          }
  
          if ($this->rendered) {
              $this->output->clear($this->calculateRowCount());
          }
  
          $this->addRow($row);
          $this->render();
  
          return $this;
      }
code_tokens: public function appendRow ( $ row ) : self { if ( ! $ this -> output instanceof ConsoleSectionOutput ) { throw new RuntimeException ( sprintf ( 'Output should be an instance of "%s" when calling "%s".' , ConsoleSectionOutput :: class , __METHOD__ ) ) ; } if ( $ this -> rendered ) { $ this -> output -> clear ( $ this -> calculateRowCount ( ) ) ; } $ this -> addRow ( $ row ) ; $ this -> render ( ) ; return $ this ; }
docstring: Adds a row to the table, and re-renders the table.
docstring_tokens: Adds a row to the table and re - renders the table .