From 6e478862273946a2088ff3b672ef64034473bcf3 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Thu, 22 May 2014 01:24:11 +0200 Subject: [ticket/12575] Remove inline assignments PHPBB3-12575 --- phpBB/phpbb/di/service_collection.php | 3 ++- phpBB/phpbb/di/service_collection_iterator.php | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/phpBB/phpbb/di/service_collection.php b/phpBB/phpbb/di/service_collection.php index 3ae3f793c0..6a2e62a553 100644 --- a/phpBB/phpbb/di/service_collection.php +++ b/phpBB/phpbb/di/service_collection.php @@ -51,7 +51,8 @@ class service_collection extends \ArrayObject */ public function offsetGet($index) { - if (($task = parent::offsetGet($index)) == null) + $task = parent::offsetGet($index); + if ($task == null) { $task = $this->container->get($index); $this->offsetSet($index, $task); diff --git a/phpBB/phpbb/di/service_collection_iterator.php b/phpBB/phpbb/di/service_collection_iterator.php index 93f74adca9..a6cb0e6c3e 100644 --- a/phpBB/phpbb/di/service_collection_iterator.php +++ b/phpBB/phpbb/di/service_collection_iterator.php @@ -39,7 +39,8 @@ class service_collection_iterator extends \ArrayIterator */ public function offsetGet($index) { - if (($task = parent::offsetGet($index)) == null) + $task = parent::offsetGet($index); + if ($task == null) { $task = $this->container->get($index); $this->offsetSet($index, $task); @@ -61,7 +62,8 @@ class service_collection_iterator extends \ArrayIterator */ public function current() { - if (($task = parent::current()) == null) + $task = parent::current(); + if ($task == null) { $name = $this->key(); $task = $this->container->get($name); -- cgit v1.2.1