Skip to content

Conversation

@samsonasik
Copy link
Member

Description

Continue of PR:

this ensure preg_match_all() which with falsy check ensure got exact equal result, wich compare to >=1 or <1 which can be false or 0.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@samsonasik samsonasik changed the title refactor: use more strict result on preg_match_all() result refactor: use more strict result check on preg_match_all() result Jan 1, 2025
@samsonasik
Copy link
Member Author

Ready to merge 👍

Copy link
Contributor

@neznaika0 neznaika0 left a comment

Choose a reason for hiding this comment

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

Good. Why not > 0 ?

@samsonasik
Copy link
Member Author

that's to make consistent with negation, if 0 or false, it uses < 1, so >=1 is chosen for found.

@samsonasik
Copy link
Member Author

Thank you @michalsn @neznaika0 for the review, let's merge 👍

@samsonasik samsonasik merged commit 3c851f1 into codeigniter4:develop Jan 2, 2025
41 checks passed
@samsonasik samsonasik deleted the refactor-more-strict branch January 2, 2025 01:15
@kenjis kenjis added the refactor Pull requests that refactor code label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Pull requests that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants