I have an object with getters and setters but I'm loosing intellisense on that object when I pass it to a function or while iterating through a array of these objects.
For example:
...
$personA = new Person(..);
$age = $personA->getAge(); // intellisense works.
$personArray = array($personA, $personB, .. );
foreach($personArray as $aPerson){
$aPerson->getAge(); // no intellisense here
}
doSomething($personA);
function doSomething($person){
$person->getAge() // no intellisense here
...
}
What am I missing here?
Do I need to make a change to code(casting.. etc), Missing a phpStorm setting? Maybe it's not possible?