Hi!
I am afraid that this behaviour is common for all IDEs, because in general there is no way to know, what class name is in the variable at the time of class creation.
If possible, I suggest to create extra methods together with phpDoc and use them as creation mediators like:
/**
* @return MyClass
*/
function newMyClass() {
return new objectFactory::Create("MyClass");
}
$obj = newMyClass(); // code insight works now |
You can possibly make these extra methods part of your objectFactory class, so you could call comething like "$obj = objectFactory::createMyClass();".
It is not a perfect solution, but still I hope this helps you a little.