Skip to content
Advertisement

Tag: phpstorm

PHPStorm: correct PHPDoc for a Collection of Objects?

I’m using the PHPStorm IDE, and run into trouble when I run the code inspection. I have a method which returns a collection of objects. The Collection itself is an object, which has its own methods, and implements the Traversable interface: If I document findByUser() to return a Collection, the code inspection understands the methods on this object, but doesn’t

How can I set the PHP version in PHPStorm?

Is it possible to set the PHP version value, say 4.0+ and have PHPStorm highlight functions that wouldn’t work with the oldest version? For example, for PHP4 this should highlight static function etc. I have a PHP installation on my PC but I don’t want to install an older PHP version for every small script I have to produce. Thanks

JetBrains WebIDE: PHP variable type hinting?

Is there a way to hint WebIDE that a variable has some type? I have to iterate an array of objects, and there’s no auto-completion available. This helps in ZendStudio: I know there’s a feature in JetBrains to declare an array of objects: But this works only with function’s return type. Answer /* @var ClassName $object */ is a non-valid

Advertisement