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

Feature/typehint hardening #506

Merged
merged 10 commits into from
Sep 25, 2024
Merged

Feature/typehint hardening #506

merged 10 commits into from
Sep 25, 2024

Conversation

SecondeJK
Copy link
Contributor

@SecondeJK SecondeJK commented Sep 25, 2024

While this PR might look a bit big, it's just a cleanup to harden the code. This is a review of the codebase where Typehints can be introduced.

Description

Typehints with nullsafe settings have been introduced wherever they can. While it could be regarded as a SemVer backwards breaking change, it technically is not. This is because the only way you could be calling the existing methods or properties that are not typehinted is through passing in wrong types which would result in an exception anyway.

The exception to the review is the SMS Client, which is used by Laravel and therefore will only be updated with the next major version of the SDK.

Motivation and Context

Harden API to add standards

How Has This Been Tested?

The test library has been key to this in that it has been run with each iteration of the code changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@SecondeJK SecondeJK merged commit 24bcc1a into main Sep 25, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant