Added ReflectionProperty::getClassName()#1039
Added ReflectionProperty::getClassName()#1039philsturgeon wants to merge 5 commits intophp:masterphp/php-src:masterfrom philsturgeon:reflection-get-class-namephilsturgeon/php-src:reflection-get-class-nameCopy head branch name to clipboard
Conversation
f84a329 to
d255ba3
Compare
There was a problem hiding this comment.
Should this alsy contain array and callable typehtint?
There was a problem hiding this comment.
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 notifications@github.com 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.
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