Gii ActiveQuery Template, why it overrides methods?

Hi. I was wondering, why Gii overrides one() and all() in ActiveQuery ?

I understand this has done for code autocomplete in IDE. But why don’t use phpdoc @method instead? Is there some hidden purpose?

Gii creates those methods as an example for you to get started, you can either remove them or extend them

Thank you for your responses. I know that I could create my own template. But I want to know why the Core Team put this into the default template. Are there any reasons?

Because a lot of developers are using default template. And I have met a lot queries with just overwritten methods instead of using apidoc @method. I even thought it’s some kind of yii idiom.

Maybe it’s just because they wanted to let users ability to use php7 returns type hinting, no?

public function one(): Article