This file can be included in phpstan config using stubFiles directive.
namespace yii\db {
class ActiveRecord {
/**
* @phpstan-return ActiveQuery<static>
*/
public static function find();
}
/**
* @template T of ActiveRecord
*/
class ActiveQuery {
/**
* @phpstan-return T[]
*/
public function all($db = null);
/**
* @phpstan-return T|null
*/
public function one($db = null);
}
}
This file can be included in phpstan config using
stubFiles
directive.