src/Neutrino/Config/ReturnConverter.php
public function afterTraverse(array $nodes)
    {
        $last = $nodes[count($nodes) - 1];

        if (!($last instanceof Return_)) {
            throw new \Exception('Last statement must be the return of config.');
        }

        $exprAssign = new Assign(
            new ArrayDimFetch(
                new Variable($this->variable),
                new String_($this->name)
            ),
            $last->expr
        );

        $nodes[count($nodes) - 1] = $exprAssign;

        return $nodes;
    }
public function afterTraverse(array $nodes)
    {
        $last = $nodes[count($nodes) - 1];

        if (!($last instanceof Return_)) {
            throw new \Exception('Last statement must be the return of config.');
        }

        $exprAssign = new Assign(
            new ArrayDimFetch(
                new Variable($this->variable),
                new String_($this->name)
            ),
            $last->expr
        );

        $nodes[count($nodes) - 1] = $exprAssign;

        return $nodes;
    }
@param array $nodes

@return \PhpParser\Node[]
@throws \Exception