original_string: public function format_and_add_array_of_rows($rowstoadd, $finish = true) {
          foreach ($rowstoadd as $row) {
              if (is_null($row)) {
                  $this->add_separator();
              } else {
                  $this->add_data_keyed($this->format_row($row));
              }
          }
          if ($finish) {
              $this->finish_output(!$this->is_downloading());
          }
      }
code: public function format_and_add_array_of_rows($rowstoadd, $finish = true) {
          foreach ($rowstoadd as $row) {
              if (is_null($row)) {
                  $this->add_separator();
              } else {
                  $this->add_data_keyed($this->format_row($row));
              }
          }
          if ($finish) {
              $this->finish_output(!$this->is_downloading());
          }
      }
code_tokens: public function format_and_add_array_of_rows ( $ rowstoadd , $ finish = true ) { foreach ( $ rowstoadd as $ row ) { if ( is_null ( $ row ) ) { $ this -> add_separator ( ) ; } else { $ this -> add_data_keyed ( $ this -> format_row ( $ row ) ) ; } } if ( $ finish ) { $ this -> finish_output ( ! $ this -> is_downloading ( ) ) ; } }
docstring: Add a number of rows to the table at once. And optionally finish output after they have been added.
  
  @param (object|array|null)[] $rowstoadd Array of rows to add to table, a null value in array adds a separator row. Or a
  object or array is added to table. We expect properties for the row array as would be
  passed to add_data_keyed.
  @param bool     $finish
docstring_tokens: Add a number of rows to the table at once . And optionally finish output after they have been added .