Answer the question
In order to leave comments, you need to log in
Code highlighting using trait in php
Many IDEs provide code highlighting and suggest auto substitution options based on the phpdoc documentation.
When using trait in php, it is not always possible to describe in advance what type the method will return or what type the property stores.
For example:
trait T_Singleton {
/**
* Вернуть единственный экземпляр класса
*
* @return
*/
static public function getInstance() {
...
}
}
/**
* @static @method Template_View getInstance()
*/
class Template_View {
trait T_Singleton;
...
}
Answer the question
In order to leave comments, you need to log in
This is a bug, I recently noticed this too, created an issue in the PhpStorm tracker, please vote for a faster fix:
youtrack.jetbrains.com/issue/WI-19305
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question