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

Add supported Country check #46

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

iekadou
Copy link
Contributor

@iekadou iekadou commented Jul 16, 2024

Add isCountrySupported function

@iekadou iekadou requested a review from lekoala as a code owner July 16, 2024 15:35
Copy link

what-the-diff bot commented Jul 16, 2024

PR Summary

  • Modification of TIN.php file
    A key file used in our system has been updated, resulting in improved performance and increased efficiency.
    • Adaptation of $algorithms property
      The property is no longer uniquely tied to each instance of our object but is shared across all instances, which is useful in saving memory and computational resources.
    • Introduction of a new method - isCountrySupported
      This new function simplifies the process of checking the validity of country codes, increasing the speed of operations involving country data.
    • Refactoring of getAlgorithm method
      By using the shared $algorithms property rather than instance-specific ones, this method is now more performance-efficient.
    • Added return type declaration for isValid method
      With the inclusion of explicit method return type, we can now avoid potential programming mistakes and improve the overall code stability.
    • General code formatting improvements
      Including some cosmetic changes to the code to make it more readable and aesthetically pleasing. This contributes towards better maintainability of the code.

Copy link
Contributor

@drupol drupol left a comment

Choose a reason for hiding this comment

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

Do you mind fixing the code style ./vendor/bin/grumphp run --tasks=phpcsfixer ?

@drupol drupol merged commit 111a75b into loophp:master Jul 17, 2024
13 of 14 checks passed
@drupol
Copy link
Contributor

drupol commented Jul 17, 2024

Thank you!

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.

3 participants