Open craiglondon opened 5 years ago
Hi @craiglondon, thank you for reporting. I'll take a look what happens here, hopefully with a solution. Currently, I re-working plugin build scripts and come back to this when all works again.
@brandonkelly, @samdark: do we need to add @property
annotation for getters returning ActiveQuery
as well (or we do stick to scalar types only)?
@kalessil that's magical part of the framework. In fact, these are relations so while getter method return ActiveQuery, property is a result of this query. Annotation should be the following for the case:
* @property BillTypeForm $billType
Awesome, thank you @samdark for the prompt answer!
My environment MacOS Sierra PHPStorm 2018.3.1 Yii2Inspections 1.0.3 Yii 2.0.15.1
In my model, an ActiveQuery property was not annotated.
Here is the code for the property to be annotated
I clicked the "Annotate properties" button.
* @property \yii\db\ActiveQuery $billType
was added to the PHPDoc block.I run the inspection again, and the same property is determined to be annotated.
Another slightly strange thing about it, it doesn't add it as the last property, it adds it to the second to last.
Before "Annotate properties"
After "Annotate properties"
If I click the "Annotate properties" button again, I'll get a duplicate property line, and then a newly detected error.