Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix returned NamespaceType for Parameters from Reflection #5193

Closed
wants to merge 5 commits into
from

Conversation

Projects
None yet
4 participants
Contributor

danez commented Sep 30, 2013

If a parameter inside a namespace-class has a typehint to an other namespaced-class the returned typehint lacks the beginning backslash.

@samsonasik samsonasik commented on the diff Sep 30, 2013

...t/Code/Generator/TestAsset/NamespaceTypeHintClass.php
@@ -0,0 +1,19 @@
+<?php
@samsonasik

samsonasik Sep 30, 2013

Contributor

add license docblock here ?

@danez

danez Oct 23, 2013

Contributor

done

@samsonasik samsonasik commented on an outdated diff Sep 30, 2013

...t/Code/Generator/TestAsset/NamespaceTypeHintClass.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Zend Framework (http://framework.zend.com/)
+ *
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
+ * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+namespace Namespaced\TypeHint {
+
+ use OtherNamespace\ParameterClass;
+
+ class Bar {
@samsonasik

samsonasik Sep 30, 2013

Contributor

place "{" at new line.

@samsonasik samsonasik commented on an outdated diff Sep 30, 2013

...t/Code/Generator/TestAsset/NamespaceTypeHintClass.php
+
+namespace Namespaced\TypeHint {
+
+ use OtherNamespace\ParameterClass;
+
+ class Bar {
+
+ public function method(ParameterClass $object)
+ {
+ }
+ }
+}
+
+namespace OtherNamespace {
+
+ class ParameterClass {
@samsonasik

samsonasik Sep 30, 2013

Contributor

place "{" at new line.

Contributor

samsonasik commented Sep 30, 2013

@danez maybe

php php-cs-fixer.phar  fix tests/ZendTest/Code/Generator/TestAsset/NamespaceTypeHintClass.php  

?

Contributor

danez commented Oct 1, 2013

sorry, haven't had time to wait for travis yesterday.

Contributor

danez commented Oct 10, 2013

Any news on this?

Member

Ocramius commented Oct 17, 2013

👍

@ghost ghost assigned weierophinney Oct 23, 2013

weierophinney added a commit that referenced this pull request Oct 23, 2013

Merge pull request #5193 from Danez/master
Fix returned NamespaceType for Parameters from Reflection

weierophinney added a commit that referenced this pull request Oct 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment