php-cs-fixer remove unnecessary variable

54 Views Asked by At

I would like to have the code below adjusted via php-cs-fixer. The variable $aExample is not needed in this case and could therefore be returned immediately.

Does anyone know if there is an option for that?

public function example(): array
    {
        $aExample = $this->oModel->example();

        return $aExample;
    }

Changed to:

public function example(): array
    {
        return $this->oModel->example();

    }
1

There are 1 best solutions below

0
kuba On BEST ANSWER