pbyrne84 / DynamicReturnTypePlugin

135 stars 7 forks source link

Class Name in variable #37

Closed alecsammon closed 9 years ago

alecsammon commented 9 years ago

Hi - fantastic plugin - thank you

I'm having issues if the parameter is a variable, not a string - as in the following example

$className = '\DomDocument';
$dd = mock($className);
Danack commented 9 years ago

I think this should be out of scope for this plugin.

This plugin is for when the thing being made is of a single type, and can be reasoned about with absolute clarity. When the thing being made is a variable then unless the rest of the program can be understood by the plugin completely, then there will always be some vagueness.

alecsammon commented 9 years ago

Sorry - I hadn't thought through all the implications of this request. Agreed!