original_string: public static function isEqual(DataTable $table1, DataTable $table2)
      {
          $table1->rebuildIndex();
          $table2->rebuildIndex();
  
          if ($table1->getRowsCount() != $table2->getRowsCount()) {
              return false;
          }
  
          $rows1 = $table1->getRows();
  
          foreach ($rows1 as $row1) {
              $row2 = $table2->getRowFromLabel($row1->getColumn('label'));
              if ($row2 === false
                  || !Row::isEqual($row1, $row2)
              ) {
                  return false;
              }
          }
  
          return true;
      }
code: public static function isEqual(DataTable $table1, DataTable $table2)
      {
          $table1->rebuildIndex();
          $table2->rebuildIndex();
  
          if ($table1->getRowsCount() != $table2->getRowsCount()) {
              return false;
          }
  
          $rows1 = $table1->getRows();
  
          foreach ($rows1 as $row1) {
              $row2 = $table2->getRowFromLabel($row1->getColumn('label'));
              if ($row2 === false
                  || !Row::isEqual($row1, $row2)
              ) {
                  return false;
              }
          }
  
          return true;
      }
code_tokens: public static function isEqual ( DataTable $ table1 , DataTable $ table2 ) { $ table1 -> rebuildIndex ( ) ; $ table2 -> rebuildIndex ( ) ; if ( $ table1 -> getRowsCount ( ) != $ table2 -> getRowsCount ( ) ) { return false ; } $ rows1 = $ table1 -> getRows ( ) ; foreach ( $ rows1 as $ row1 ) { $ row2 = $ table2 -> getRowFromLabel ( $ row1 -> getColumn ( 'label' ) ) ; if ( $ row2 === false || ! Row :: isEqual ( $ row1 , $ row2 ) ) { return false ; } } return true ; }
docstring: Returns true if both DataTable instances are exactly the same.
  
  DataTables are equal if they have the same number of rows, if
  each row has a label that exists in the other table, and if each row
  is equal to the row in the other table with the same label. The order
  of rows is not important.
  
  @param \Piwik\DataTable $table1
  @param \Piwik\DataTable $table2
  @return bool
docstring_tokens: Returns true if both DataTable instances are exactly the same .