ZF-7886: Zend_CodeGenerator_Php_Parameter falsly assumes DocType can be used as Type-Hint

Description

Zend_CodeGenerator_Php_Parameter falsly assumes DocType can be used as Type-Hint

This issue is related to a bugfix in Zend_Reflection_Parameter in r18073 in relation with Ticket ZF-7227.

A regression case now occurs for CodeGenerator because an @param int $var is rewritten back on generate to be a typehint "int".

The type in code generator is falsly used from the docblock type and should be the real type hint to make code generation from reflection a bijective function.

Comments

Patch for a regression introduced in ZF-7227 which was related to the named false assumption.

ZF-7884 describes the regression tests that fail due to this issue and the bugfix in Reflection which caused it.

Fixed in trunk and merged into 1.9 release branch