pbyrne84 / DynamicReturnTypePlugin

135 stars 7 forks source link

(Feature Request) Enable Typehint with PHPDoc. #60

Open chozilla opened 8 years ago

chozilla commented 8 years ago

Hi, would it be possible to also write proprietary PHPDoc return types to be interpreted with the Plugin?

for example:

/**
 * Function Test
 * @param string $name
 *
 * @dynReturn Test_{$name}_Class
 */
function Service($name) {
    $class = 'Test_'.$name.'_Class';
    return new $class();
}

Best Regards \ chojin