# Ide helper Problem with 'contain'

**URL:** <https://discourse.cakephp.org/t/ide-helper-problem-with-contain/12009>\
**Category:** Uncategorized\
**Created:** [May 9, 2024, 2:38pm UTC](https://discourse.cakephp.org/t/ide-helper-problem-with-contain/12009 "2024-05-09T14:38:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yousuo](https://avatars.discourse-cdn.com/v4/letter/y/898d66/32.png) [@yousuo](https://discourse.cakephp.org/u/yousuo)\
**Post date:** [May 9, 2024, 2:38pm UTC](https://discourse.cakephp.org/t/ide-helper-problem-with-contain/12009/1 "2024-05-09T14:38:09Z")

</div>

Hi,

My phpstorm shows that named-param ‘contain’ as an error. It is similar to this [case](https://github.com/cakephp/bake/issues/944).

 ![contain error 1](https://canada1.discourse-cdn.com/flex029/uploads/cakephp/original/2X/c/c0e573bf892605ab1add43ef7b799e8f73c5a466.png)

I have tried to reinstall/update the ide-helper

```auto
composer require --dev dereuromark/cakephp-ide-helper
bin/cake plugin load IdeHelper
bin/cake generate phpstorm

```

This generated a `.phpstorm.meta.php/.ide-helper.meta.php` file.

Invalidated and restarted phpstorm, but the error still shows.

Am I missing a step ?

---

<div class="post-metadata">

**Author:** ![KevinPfeifer](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/kevinpfeifer/32/3365_2.png) [@KevinPfeifer](https://discourse.cakephp.org/u/KevinPfeifer)\
**Post date:** [May 10, 2024, 6:53am UTC](https://discourse.cakephp.org/t/ide-helper-problem-with-contain/12009/2 "2024-05-10T06:53:53Z")

</div>

You need to generate the model annotations

> <https://github.com/dereuromark/cakephp-ide-helper/blob/master/docs/Annotations.md#models>

But I’d recommend you do all annotations via

```auto
bin/cake annotate all

```

---

<div class="post-metadata">

**Author:** ![yousuo](https://avatars.discourse-cdn.com/v4/letter/y/898d66/32.png) [@yousuo](https://discourse.cakephp.org/u/yousuo)\
**Post date:** [May 13, 2024, 1:11pm UTC](https://discourse.cakephp.org/t/ide-helper-problem-with-contain/12009/3 "2024-05-13T13:11:33Z")

</div>

Thanks. After doing that, I notice this is the main change in the `src/Model/Table` files that solved the ‘contain’ error in phpstorm.

```auto
 * @method \App\Model\Entity\Example get(mixed $primaryKey, array|string $finder = 'all', \Psr\SimpleCache\CacheInterface|string|null $cache = null, \Closure|string|null $cacheKey = null, mixed ...$args)

```
