Answer the question
In order to leave comments, you need to log in
How to specify the type of a class property in PHPstorm IDE?
Good afternoon, I'm using PHP storm + yii2
and I can't make the query property be of the Query type. the ultimate goal is to use in class methods $this->query with Query hints.
Now I use such a crutch - which I really do not like.
$query = $this->query;
/**@var $query Query */
$query->orFilterWhere([
'and',
['is_company' => 0],
['access' => 0]
]);
$this->query = $query;
$this->query = $this->query->orFilterWhere([
'and',
['is_company' => 0],
['access' => 0]
]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question