We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pretty much all the setters in the AnalyticsData lib return void, it would be much nicer to return $this in all setters to be able to chain them
void
$this
Example: https://github.com/googleapis/google-api-php-client-services/blob/main/src/AnalyticsData/RunReportRequest.php
I wanted to write my requests like this
(new AnalyticsData\BatchRunReportsRequest())->setRequests([ (new AnalyticsData\RunReportRequest()) ->setDimensions([ new AnalyticsData\Dimension(['name' => 'year']), new AnalyticsData\Dimension(['name' => 'month']), new AnalyticsData\Dimension(['name' => 'medium']), ]) ->setDimensionFilter(...) ])
But without chaining, it becomes
$request1 = new AnalyticsData\RunReportRequest(); $request1->setDimensions([ new AnalyticsData\Dimension(['name' => 'year']), new AnalyticsData\Dimension(['name' => 'month']), new AnalyticsData\Dimension(['name' => 'medium']), ]); $request1->setDimensionFilter(...); $batch = new AnalyticsData\BatchRunReportsRequest(); $batch->setRequests([$request1]);
The text was updated successfully, but these errors were encountered:
Please use this analytics data client, as the one you are using is no longer supported.
composer require google/analytics-data
Sorry, something went wrong.
No branches or pull requests
Pretty much all the setters in the AnalyticsData lib return
void
, it would be much nicer to return$this
in all setters to be able to chain themExample:
https://github.com/googleapis/google-api-php-client-services/blob/main/src/AnalyticsData/RunReportRequest.php
I wanted to write my requests like this
But without chaining, it becomes
The text was updated successfully, but these errors were encountered: