You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search for all calls to PHP functions who modify the pointer (example: AbstractCollection::replace() whol call reset())
<?php
class Collection extends ObjectCollection
{
public function getPointer(): CollectionPointer;
public function getFirstValue(): Foo
{
return $this->values[array_key_first()];
}
}
class CollectionPointer
{
public function __construct(private readonly Collection $collection)
{
}
public function reset(): static;
public function getNextValue(): Foo;
public function getFirstValue(): Foo
{
$this->reset();
return current($this->collection->value);
}
public function getCurrentValue(): Foo;
}
$foo = new Collection();
$foo->getPointer()->getFirstValue();
$foo->getPointer()->getNextValue();
The text was updated successfully, but these errors were encountered:
Search for all calls to PHP functions who modify the pointer (example:
AbstractCollection::replace()
whol callreset()
)The text was updated successfully, but these errors were encountered: