We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug When iterating over an SplObjectStorage, the value is actually the key, intelephense does not account for this.
To Reproduce
<?php class a { public function method() {} } class b { /** @var SplObjectStorage<a, void> */ public SplObjectStorage $list; } $a = new b; $a->list = new SplObjectStorage; $a->list->attach(new a); foreach ($a->list as $key => $object) { $key->method(); $object->method(); }
Screenshots
Platform and version Arch, 1.5.3
The text was updated successfully, but these errors were encountered:
All iterables and ArrayAccesss currently have a <TKey, TValue> template. If I understand correctly SplObjectStorage would be something like:
iterable
ArrayAccess
<TKey, TValue>
SplObjectStorage
class SplObjectStorage<K, V> implements Iterator<int, K>, ArrayAccess<K, V>
This wont happen until #1144
Sorry, something went wrong.
Working in 1.9
No branches or pull requests
Describe the bug
When iterating over an SplObjectStorage, the value is actually the key, intelephense does not account for this.
To Reproduce
Screenshots
Platform and version
Arch, 1.5.3
The text was updated successfully, but these errors were encountered: