Another suggestion for a new inspection.
All ActiveRecord->save() method returns if the model has been saved. You must check it. Many developer don't do it and relay that the method will be successfully always.
Yii specific, for objects that inherits ActiveQuery, I use a proxy function to add PHPDoc, for example in this case the class is ActionQuery extends ActiveQuery and the method one() I want to specify that can returns Action (that extends ActiveRecord)
https://twitter.com/juanmacias/status/997385916267356160
Another suggestion for a new inspection. All ActiveRecord->save() method returns if the model has been saved. You must check it. Many developer don't do it and relay that the method will be successfully always.
https://twitter.com/juanmacias/status/997385573013905408
Yii specific, for objects that inherits ActiveQuery, I use a proxy function to add PHPDoc, for example in this case the class is ActionQuery extends ActiveQuery and the method one() I want to specify that can returns Action (that extends ActiveRecord)
https://twitter.com/juanmacias/status/997384795083739137
Yii specific: Second instruction must be second and is slower