[ticket/12575] Remove inline assignments

PHPBB3-12575
This commit is contained in:
Tristan Darricau 2014-05-22 01:24:11 +02:00
parent bea9372efa
commit 6e47886227
2 changed files with 6 additions and 3 deletions

View file

@ -51,7 +51,8 @@ class service_collection extends \ArrayObject
*/ */
public function offsetGet($index) public function offsetGet($index)
{ {
if (($task = parent::offsetGet($index)) == null) $task = parent::offsetGet($index);
if ($task == null)
{ {
$task = $this->container->get($index); $task = $this->container->get($index);
$this->offsetSet($index, $task); $this->offsetSet($index, $task);

View file

@ -39,7 +39,8 @@ class service_collection_iterator extends \ArrayIterator
*/ */
public function offsetGet($index) public function offsetGet($index)
{ {
if (($task = parent::offsetGet($index)) == null) $task = parent::offsetGet($index);
if ($task == null)
{ {
$task = $this->container->get($index); $task = $this->container->get($index);
$this->offsetSet($index, $task); $this->offsetSet($index, $task);
@ -61,7 +62,8 @@ class service_collection_iterator extends \ArrayIterator
*/ */
public function current() public function current()
{ {
if (($task = parent::current()) == null) $task = parent::current();
if ($task == null)
{ {
$name = $this->key(); $name = $this->key();
$task = $this->container->get($name); $task = $this->container->get($name);