foreach ($results as $obj) {
$this->dates[$obj->getName()] = $obj;
}
This runs fine, but PHPStorm gives the hint,
Method getName not found in class.
Seems like there ought to be a way to give it a hint about the type of the object. How do I get it to recognize that this is an instance of a particular class like we can with method parameters? Something like
foreach ($results as MyClass $obj) {