Skip to content
New issue

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

Implemented stats helper #506

Merged
merged 5 commits into from
Mar 28, 2018

Conversation

runz0rd
Copy link
Contributor

@runz0rd runz0rd commented Oct 21, 2017

For #487

@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Oct 21, 2017
@SendGridDX
Copy link

SendGridDX commented Oct 21, 2017

CLA assistant check
All committers have signed the CLA.

return array_keys($array) == range(0, count($array) - 1);
}

}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline at the EOF

@shonjord
Copy link

Excellent PR, but can you make it compatible with PSR2?

@runz0rd
Copy link
Contributor Author

runz0rd commented Oct 26, 2017

Sure, coming up.

@runz0rd
Copy link
Contributor Author

runz0rd commented Oct 27, 2017

Note: The \SendGrid\Client will have issues with forming the query strings with requests that contain arrays such as Stats::getSubuser() with subusers being a numericArray inside it.
The \SendGrid\Client::buildUrl() uses http_build_query(), and will output something like subusers[0]=x&subusers[1]=x...
One solution for this would be to replace the string in question after http_build_query():

$path .= '?' . http_build_query($queryParams);
$path = preg_replace('/%5B[0-9]+%5D/simU', '', $path);

@thinkingserious thinkingserious added difficulty: medium fix is medium in difficulty hacktoberfest labels Oct 28, 2017
@thinkingserious thinkingserious added the type: community enhancement feature request not on Twilio's roadmap label Feb 28, 2018
@thinkingserious thinkingserious merged commit 76aa1e1 into sendgrid:master Mar 28, 2018
@thinkingserious
Copy link
Contributor

Hello @runz0rd,

Thanks again for the PR!

We appreciate your contribution and look forward to continued collaboration. Thanks!

Team SendGrid DX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty status: code review request requesting a community code review or review from Twilio type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants