diff --git a/resources/functionMap.php b/resources/functionMap.php index dc930429af6..ae098e5483b 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -11349,27 +11349,6 @@ 'spliti' => ['array', 'pattern'=>'string', 'string'=>'string', 'limit='=>'int'], 'SplMaxHeap::compare' => ['int', 'a'=>'mixed', 'b'=>'mixed'], 'SplMinHeap::compare' => ['int', 'a'=>'mixed', 'b'=>'mixed'], -'SplObjectStorage::addAll' => ['void', 'os'=>'splobjectstorage'], -'SplObjectStorage::attach' => ['void', 'obj'=>'object', 'inf='=>'mixed'], -'SplObjectStorage::contains' => ['bool', 'obj'=>'object'], -'SplObjectStorage::count' => ['int'], -'SplObjectStorage::current' => ['object'], -'SplObjectStorage::detach' => ['void', 'obj'=>'object'], -'SplObjectStorage::getHash' => ['string', 'obj'=>'object'], -'SplObjectStorage::getInfo' => ['mixed'], -'SplObjectStorage::key' => ['int'], -'SplObjectStorage::next' => ['void'], -'SplObjectStorage::offsetExists' => ['bool', 'object'=>'object'], -'SplObjectStorage::offsetGet' => ['mixed', 'obj'=>'object'], -'SplObjectStorage::offsetSet' => ['object', 'object'=>'object', 'data='=>'mixed'], -'SplObjectStorage::offsetUnset' => ['object', 'object'=>'object'], -'SplObjectStorage::removeAll' => ['void', 'os'=>'splobjectstorage'], -'SplObjectStorage::removeAllExcept' => ['void', 'os'=>'splobjectstorage'], -'SplObjectStorage::rewind' => ['void'], -'SplObjectStorage::serialize' => ['string'], -'SplObjectStorage::setInfo' => ['void', 'inf'=>'mixed'], -'SplObjectStorage::unserialize' => ['void', 'serialized'=>'string'], -'SplObjectStorage::valid' => ['bool'], 'SplObserver::update' => ['void', 'subject'=>'splsubject'], 'SplPriorityQueue::compare' => ['int', 'a'=>'mixed', 'b'=>'mixed'], 'SplPriorityQueue::count' => ['int'], diff --git a/stubs/ArrayObject.stub b/stubs/ArrayObject.stub index 3fddb2b3134..07f57cafd59 100644 --- a/stubs/ArrayObject.stub +++ b/stubs/ArrayObject.stub @@ -105,3 +105,65 @@ class SplFixedArray implements Iterator, ArrayAccess, Countable */ public function toArray(): array { } } + +/** + * @template TKey of object + * @template TValue + * + * @template-implements Iterator + * @template-implements ArrayAccess + */ +interface SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess +{ + + /** + * @param \SplObjectStorage $storage + */ + public function addAll(SplObjectStorage $storage): void; + + /** + * @param TKey $object + * @param TValue $data + */ + public function attach(object $object, $data = null): void; + + /** + * @param TKey $object + */ + public function contains(object $object): bool; + + /** + * @param TKey $object + */ + public function detach(object $object): void; + + /** + * @param TKey $object + */ + public function detach(object $object): void; + + /** + * @param TKey $object + */ + public function getHash(object $object): string; + + /** + * @return TValue + */ + public function getInfo(); + + /** + * @param \SplObjectStorage $storage + */ + public function removeAll(SplObjectStorage $storage): void; + + /** + * @param \SplObjectStorage $storage + */ + public function removeAllExcept(SplObjectStorage $storage): void; + + /** + * @param TValue $data + */ + public function setInfo($data): void; +}