diff options
author | Andreas Fischer <bantu@phpbb.com> | 2014-06-14 18:33:23 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2014-06-14 18:33:23 +0200 |
commit | 2149bd4e8f34092be8ef75cf59b9bd410d9a80d5 (patch) | |
tree | 5c5513320e6e3f7c3673997d15a9319bca78a586 | |
parent | f4602878562b046ae6f51ee7a23bf3e5f9a08126 (diff) | |
download | forums-2149bd4e8f34092be8ef75cf59b9bd410d9a80d5.tar forums-2149bd4e8f34092be8ef75cf59b9bd410d9a80d5.tar.gz forums-2149bd4e8f34092be8ef75cf59b9bd410d9a80d5.tar.bz2 forums-2149bd4e8f34092be8ef75cf59b9bd410d9a80d5.tar.xz forums-2149bd4e8f34092be8ef75cf59b9bd410d9a80d5.zip |
[ticket/12575] Do not duplicate logic in service_collection_iterator.
PHPBB3-12575
-rw-r--r-- | phpBB/phpbb/di/service_collection_iterator.php | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/phpBB/phpbb/di/service_collection_iterator.php b/phpBB/phpbb/di/service_collection_iterator.php index 3fb5671cc5..0d031ab52d 100644 --- a/phpBB/phpbb/di/service_collection_iterator.php +++ b/phpBB/phpbb/di/service_collection_iterator.php @@ -41,14 +41,6 @@ class service_collection_iterator extends \ArrayIterator */ public function current() { - $task = parent::current(); - if ($task === null) - { - $name = $this->key(); - $task = $this->collection->offsetGet($name); - $this->offsetSet($name, $task); - } - - return $task; + return $this->collection->offsetGet($this->key()); } } |