Skip to content

Commit

Permalink
Added override on testing the GoogleAnalyticsReportsApiFeed object
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanboring committed Oct 21, 2024
1 parent f3d154b commit c12a9af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"license": "GPL-2.0+",
"minimum-stability": "dev",
"require": {},
"require-dev": {
"google/analytics-data": "*"
},
"suggest": {
"drupal/statistics": "Replacement for the deprecated core Statistics module, required for the Node Views module."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ private function getSummaryResults(EntityInterface $entity, $report = 'summary')
* TRUE if Google Analytics Reports is setup.
*/
private function isGoogleAnalyticsReportsSetup(): bool {
// @phpstan-ignore-next-line
$account = GoogleAnalyticsReportsApiFeed::service();
$imported = $this->configFactory->get('google_analytics_reports.settings')->get('metadata_last_time');
return $account && $account->isAuthenticated() && $imported;
Expand Down

0 comments on commit c12a9af

Please sign in to comment.