mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 23:07:39 +02:00
[ticket/12575] Remove inline assignments
PHPBB3-12575
This commit is contained in:
@@ -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);
|
||||||
|
@@ -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);
|
||||||
|
Reference in New Issue
Block a user