-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
code refactor #364
code refactor #364
Conversation
The PHPDoc return type hint was incomplete, it should have been `InvalidEmail|null`, however, it can be removed altogether as the return type is already inferred from the code.
This is not a breaking change as the method is private, and it's only used at one place, where the return value was not used anyway.
`private $parser` was used in only one place, hence it can be local, there is no reason to put it into the class' scope.
Concatenation already casts `static::CODE` from `int` to `string`, no reason to do it explicitly.
- fixed numbering at the `Available validations` section - fixed overall formatting
Hi @xHeaven , thanks for the PR.
Thanks! |
Hey @egulias, the Psalm errors should be fixed. |
Is there anything I can do to help successfully execute the currently failing test? I've got 9-ish emails about it so far, let me know if there's anything I can do. @egulias |
Hey @xHeaven , apologies for the spam! I didn't realise you were getting the emails too. Will use this PR to test, you might get more spam, apologies in advance now :). Still working on the review, thanks for your patience! |
No worries, keep me updated! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey. Thanks for waiting.
I have left some comments for you. Many are aesthetics more than anything, that I'd like to keep.
A couple need some conversation.
Also using constructor property promotion, see more info about it [here](https://php.watch/versions/8.0/constructor-property-promotion).
Hey @egulias, I'm done with the requested changes, would you take a look at it whenever you can? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Will take the chance to see if I can manually send the coverage results and then will merge.
Thanks for the effort!
Coverage summary from CodacyMerging #364 (5ca02b4) into
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Thanks again! |
This is a code refactor. Read the commit messages and descriptions for more information on each commit.