-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
#80 validate number of closing parenthesis #81
Conversation
*/ | ||
protected function parseComments() | ||
protected function parseComments(&$openedParenthesis = 0) |
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.
Instead of passing by reference (which causes hidden side effects), the method can return the number of parenthesis found. What do you think?
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.
I was thinking of it, but it looked not obvious for method parseComments to return number of parenthesis.
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.
And making it protected within Parser
class? We can initialize it to 0 outside the loop of the Local
or Domain
parsers.
Similar side-efectish but more OOP.
WDYT?
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.
Do you mean to change the $openParenthesis variable to a protected field?
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.
Yes.
El 5/10/2015 8:01 p. m., "Andrei Sozonov" [email protected]
escribió:
In src/Egulias/EmailValidator/Parser/Parser.php
#81 (comment):*/
- protected function parseComments()
- protected function parseComments(&$openedParenthesis = 0)
Do you mean to change the $openParenthesis variable to a protected field?
—
Reply to this email directly or view it on GitHub
https://github.com/egulias/EmailValidator/pull/81/files#r41175960.
If it's alright now, let's proceed with a release. I would like to have those changes in my project. Thanks! |
#80 validate number of closing parenthesis
Sorry for the delay. |
1.2.10 is out with your changes. |
Great! Thanks! |
Fix issue #80.
Checking number of closing parenthesis and compare it with number of parenthesis opened before.