# PHPStan complaining about entity table phpdocs

**URL:** <https://discourse.cakephp.org/t/phpstan-complaining-about-entity-table-phpdocs/12830>\
**Category:** Uncategorized\
**Created:** [April 24, 2026, 9:59am UTC](https://discourse.cakephp.org/t/phpstan-complaining-about-entity-table-phpdocs/12830 "2026-04-24T09:59:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schroeder](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@Schroeder](https://discourse.cakephp.org/u/Schroeder)\
**Post date:** [April 24, 2026, 9:59am UTC](https://discourse.cakephp.org/t/phpstan-complaining-about-entity-table-phpdocs/12830/1 "2026-04-24T09:59:50Z")

</div>

Hi,

The table classes I baked have a lot of `@method` annotations in their phpdoc block:

```auto
 * @method \Invoicing\Model\Entity\ResellerProof newEmptyEntity()
 * @method \Invoicing\Model\Entity\ResellerProof newEntity(array $data, array $options = [])
 * @method array<\Invoicing\Model\Entity\ResellerProof> newEntities(array $data, array $options = [])
 * @method \Invoicing\Model\Entity\ResellerProof get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args)
 * @method \Invoicing\Model\Entity\ResellerProof findOrCreate($search, ?callable $callback = null, array $options = [])
 * @method \Invoicing\Model\Entity\ResellerProof patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
 * @method array<\Invoicing\Model\Entity\ResellerProof> patchEntities(iterable $entities, array $data, array $options = [])
 * @method \Invoicing\Model\Entity\ResellerProof|false save(\Cake\Datasource\EntityInterface $entity, array $options = [])
 * @method \Invoicing\Model\Entity\ResellerProof saveOrFail(\Cake\Datasource\EntityInterface $entity, array $options = [])
 * @method iterable<\Invoicing\Model\Entity\ResellerProof>|\Cake\Datasource\ResultSetInterface<\Invoicing\Model\Entity\ResellerProof>|false saveMany(iterable $entities, array $options = [])
 * @method iterable<\Invoicing\Model\Entity\ResellerProof>|\Cake\Datasource\ResultSetInterface<\Invoicing\Model\Entity\ResellerProof> saveManyOrFail(iterable $entities, array $options = [])
 * @method iterable<\Invoicing\Model\Entity\ResellerProof>|\Cake\Datasource\ResultSetInterface<\Invoicing\Model\Entity\ResellerProof>|false deleteMany(iterable $entities, array $options = [])
 * @method iterable<\Invoicing\Model\Entity\ResellerProof>|\Cake\Datasource\ResultSetInterface<\Invoicing\Model\Entity\ResellerProof> deleteManyOrFail(iterable $entities, array $options = [])
 */

```

This causes PHPStan (with CakePHP extension) to moan about the array parameters:

`Class Invoicing\Model\Table\ResellerProofsTable has PHPDoc tag @method for method deleteMany() parameter #1 $entities with no value type specified in iterable type iterable. `

What is the suggestion here? I could delete the phpdoc methods but I was under the impression that CakePHP is fine up to level 8? This is happening at level 6, I believe.

---

<div class="post-metadata">

**Author:** ![ADmad](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/admad/32/20_2.png) [@ADmad](https://discourse.cakephp.org/u/ADmad)\
**Post date:** [April 24, 2026, 10:42am UTC](https://discourse.cakephp.org/t/phpstan-complaining-about-entity-table-phpdocs/12830/2 "2026-04-24T10:42:26Z")

</div>

Please open an issue for [Bake](https://github.com/cakephp/bake). Meanwhile you can use the [IDE Helper](https://github.com/dereuromark/cakephp-ide-helper) plugin to regenerate those docblock annotations.
