13.
IteratorAggregate: Loop over an Object!?
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Whoops, an error! Please, try again later.
7 Comments
Returning a new \ArrayIterator seems not being ok. I get this message from intelephense in vs code (Method 'Model\ShipCollection::getIterator()' is not compatible with method 'IteratorAggregate::getIterator()')
However it works, so the problem must come from vs code i guess
Hey Manolis
That's interesting. Does it says why it's incompatible?
Btw do you know if there's a way to have interface ans class methods auto generated with intelephense ? (I'm a newbie)
Hey Manolis
I'm afraid I do not. I only work with PHPUnit (which is awesome). I'd expect there is a plugin you can install or perhaps it comes with a built-in feature
Cheers!
thank you!
But i unset intelephense and put PHP tools instead and the error message wasn't there anymore
No i paste all the message
"Houston: no signs of life"
Start the conversation!