I know that for variables which aren't declared as types PhpStorm doesn't know where to look for method calls on variable names sometimes.
I know how to solve it for simple variable by providing typehint via simple PHPDoc comment :
/* @var Category $category */
$category->getNameTranslit();
but how can I do this for methods called for array element?
$categories[$key]->setIsActive(true);
/**(2 asterisk symbols) 2) Let me clarify this first -- so$categoriesis an array ofCategoryinstances -- right? If so --/** @var Category[] $categories */3) (general note, since I do not know how the rest of the code looks -- it may be all fine from your end) Try providing correct@returntag for functions as well as typehinting fields via@var-- this way local vars have bigger changes of being auto-deducted correctly.