mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 23:07:39 +02:00
[ticket/12575] Do not duplicate logic in service_collection_iterator.
PHPBB3-12575
This commit is contained in:
@@ -41,14 +41,6 @@ class service_collection_iterator extends \ArrayIterator
|
|||||||
*/
|
*/
|
||||||
public function current()
|
public function current()
|
||||||
{
|
{
|
||||||
$task = parent::current();
|
return $this->collection->offsetGet($this->key());
|
||||||
if ($task === null)
|
|
||||||
{
|
|
||||||
$name = $this->key();
|
|
||||||
$task = $this->collection->offsetGet($name);
|
|
||||||
$this->offsetSet($name, $task);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $task;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user