-
-
Notifications
You must be signed in to change notification settings - Fork 132
Add return type declaration for "equals()" method #88
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
Conversation
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 to me, you will have to rebase following the merge of #87 (there is a small conflict).
26195bb
to
3b8c6d4
Compare
Done |
Damn I didn't think about this before now but adding return types is a BC break in case anyone has extended the class. See https://3v4l.org/4DKvY for example. However the |
3b8c6d4
to
d631995
Compare
Ok, I reduced the scope to |
Thank you, let's do this! |
@@ -87,7 +87,7 @@ public function __toString() | |||
* | |||
* @return bool | |||
*/ | |||
final public function equals($variable = null) | |||
final public function equals($variable = null): bool |
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.
What about adding other return types?
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.
Please read the discussion above (basically it would be a BC break)
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.
Ah, okay. Still working on my first cup of ☕️
Adds return type declarations where applicable.
I required PHP 7.2, because it's the last version still in active support. This of course can be changed based on how maintainers prefer it.
One of the two PRs needed to fix #86