Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一些名为myClass的类,其中有以下结构:
class myClass { static $foo; public static function init() { self::$foo = new bar(); } }
如何让 phpstorm在我的其余代码中将myClass::$foo定义为bar的对象?
使用PHPDoc。
class myClass { /** * @var bar $foo - Holds a bar object. */ static $foo; }