Skip to content

Commit

Permalink
Fix formatting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-manuilov committed Mar 29, 2023
1 parent 680a723 commit 2a2d97e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/Modules/Analytics_4.php
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ protected function parse_report_response( Data_Request $data, $response ) {
return $response;
}

// Get report dimensions and return early if there is either more than one dimension or
// Get report dimensions and return early if there is either more than one dimension or
// the only dimension is not "date".
$dimensions = $this->parse_reporting_dimensions( $data );
if ( count( $dimensions ) !== 1 || $dimensions[0]->getName() !== 'date' ) {
Expand Down Expand Up @@ -1450,13 +1450,13 @@ protected function parse_report_response( Data_Request $data, $response ) {
// for it. If the metric value is missing, we will need to add one with a zero value.
$now = $start;
do {
$current_date = date( 'Ymd', $now );
$current_date = gmdate( 'Ymd', $now );

// Search for the current date in the response rows.
$found_dimenension = false;
foreach ( $rows as $row ) {
$dimention_values = $row->getDimensionValues();
if ( $dimention_values[0]->getValue() == $current_date ) {
if ( $dimention_values[0]->getValue() === $current_date ) {
$found_dimenension = true;
break;
}
Expand Down Expand Up @@ -1494,7 +1494,7 @@ protected function parse_report_response( Data_Request $data, $response ) {

// Add a day in seconds value to the current date to shift to the next date.
$now += DAY_IN_SECONDS;
} while( $now <= $end );
} while ( $now <= $end );
}

// Set updated rows back to the response object.
Expand Down

0 comments on commit 2a2d97e

Please sign in to comment.