-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Added ReflectionProperty::getClassName() #1039
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
f84a329
to
d255ba3
Compare
use Bar\Baz; | ||
|
||
class Foo { | ||
public function bar(Qux $qux, $bar, Baz $baz, \Bar\Quz $quz) {} |
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.
Should this alsy contain array and callable typehtint?
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.
Nope! Just classes.
I'll sort this all the morning. It's 4am here in NY.
Sent from my iPhone
On Jan 31, 2015, at 3:41 AM, Markus Staab [email protected] wrote:
In ext/reflection/tests/ReflectionParameter_getClassName.phpt:
@@ -0,0 +1,25 @@
+--TEST--
+Test ReflectionParameter::getClassName() usage.
+--FILE--
+<?php
+
+use Bar\Baz;
+
+class Foo {
- public function bar(Qux $qux, $bar, Baz $baz, \Bar\Quz $quz) {}
Should this alsy contain array and callable typehtint?—
Reply to this email directly or view it on GitHub.
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.
Just for the sake of completeness it might be a good idea to add params with array
and callable
typehints in the test case even though they aren't strictly needed for this patch's functionality. This would help ensure consistent behavior going forward (e.g. if someone gets a wild hair to change how the "pseudo" hints are implemented you don't want this functionality to break).
👍 |
@rdlowrey pushed as you were typing. :) |
This is a nice addition; it's a PITA to retrieve parameter typehints with the current status quo :) |
Closing as since PHP 7 this is already covered by doing |
👍! Thank you. |
https://wiki.php.net/rfc/reflectionparameter-getclassname