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

fix: Inspected code of Stats, example helpers #975

Merged
merged 7 commits into from
Jun 9, 2020
Merged

fix: Inspected code of Stats, example helpers #975

merged 7 commits into from
Jun 9, 2020

Conversation

kampalex
Copy link
Contributor

@kampalex kampalex commented Jun 9, 2020

Fixes

File examples/helpers/stats/example.php

  • Fixed pointing to non-existent class Sendgrid\Stats

File examples/helpers/mail/example.php

  • Removed namespace (not needed here)
  • Method helloEmail(): Fixed $personalization->addTo() assignment which has address null (I suppose this was not the intention)
  • Method kitchenSink(): Wrap code in try-catch, like helloEmail.
  • Methods send*(): Prevent calling post() method when $request_body = null

SendGrid/Stats/Stats

  • updated type/exception hints, typos, imports

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the master branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

kampalex added 7 commits May 19, 2020 15:38
Updated code base from upstream repository
Update repository using sendgrid/master
Sync local repository using original
Update repository using sendgrid/master
Sync local repository using original
Stats: updated type/exception hints, typos, imports
Example mail, method helloEmail: fixed Personalization addTo assignment which has address null (I suppose this was not the intention)
Additional notes for examples:
- stats: fixed pointing to non-existent class
- mail: removed namespace (not needed here), wrap sendKitchenSink example in try-catch, prevent real send if getting null request_body

Signed-off-by: Alexander Kamp <git@akamp.nl>
Signed-off-by: Alexander Kamp <git@akamp.nl>
@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Jun 9, 2020
Copy link
Contributor

@childish-sambino childish-sambino left a comment

Choose a reason for hiding this comment

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

LGTM. Nice cleanup!

@childish-sambino childish-sambino merged commit 8f78ca2 into sendgrid:master Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: code review request requesting a community code review or review from Twilio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants