original_string: public function sumMetrics($label, $row)
      {
          foreach ($row as $columnName => $columnValue) {
              if (empty($columnValue)) {
                  continue;
              }
              if (empty($this->data[$label][$columnName])) {
                  $this->data[$label][$columnName] = 0;
              }
              if (!is_numeric($columnValue)) {
                  throw new Exception("DataArray->sumMetricsPivot expects rows of numeric values, non numeric found: " . var_export($columnValue, true) . " for column $columnName");
              }
              $this->data[$label][$columnName] += $columnValue;
          }
      }
code: public function sumMetrics($label, $row)
      {
          foreach ($row as $columnName => $columnValue) {
              if (empty($columnValue)) {
                  continue;
              }
              if (empty($this->data[$label][$columnName])) {
                  $this->data[$label][$columnName] = 0;
              }
              if (!is_numeric($columnValue)) {
                  throw new Exception("DataArray->sumMetricsPivot expects rows of numeric values, non numeric found: " . var_export($columnValue, true) . " for column $columnName");
              }
              $this->data[$label][$columnName] += $columnValue;
          }
      }
code_tokens: public function sumMetrics ( $ label , $ row ) { foreach ( $ row as $ columnName => $ columnValue ) { if ( empty ( $ columnValue ) ) { continue ; } if ( empty ( $ this -> data [ $ label ] [ $ columnName ] ) ) { $ this -> data [ $ label ] [ $ columnName ] = 0 ; } if ( ! is_numeric ( $ columnValue ) ) { throw new Exception ( "DataArray->sumMetricsPivot expects rows of numeric values, non numeric found: " . var_export ( $ columnValue , true ) . " for column $columnName" ) ; } $ this -> data [ $ label ] [ $ columnName ] += $ columnValue ; } }
docstring: Generic function that will sum all columns of the given row, at the specified label's row.
  
  @param $label
  @param $row
  @throws Exception if the the data row contains non numeric values
docstring_tokens: Generic function that will sum all columns of the given row at the specified label s row .