After many happy years of coding in notepad ++ and sublime, I was advised to give a PHP IDE. I am trying phpStorm and it seems to me that this is good. Code completion and documentation is a great feature, but it doesnβt work for me when magic methods are used. Is there any work to make phpStorm understand what is going on in magic methods?
Our situation is something like this:
abstract class a { public static function __callStatic($method,$args) { if(strpos($method,"get_by_") === 0) {
The magic callStatic method allows you to get a collection of objects through 1 or more arguments that make up the function call.
I see that in these cases there is an @method operator, but phpStorm only picks up the first of these statements. In addition, I can only set the return type to mixed, where I would prefer to set it like any class it was called on (b in my example).
Any ideas or suggestions would be greatly appreciated, thanks.
php phpstorm magic-methods documentation docblocks
Rob Forrest Mar 26 '13 at 9:54 on 2013-03-26 09:54
source share