<?php

namespace Expressly\Event;

use Symfony\Component\EventDispatcher\Event;

class ResponseEvent extends Event
{
    private $response;

    public function getResponse()
    {
        $json = json_decode($this->response, true);

        return is_array($json) ? $json : $this->response;
    }

    public function setResponse($response)
    {
        $this->response = $response;

        return $this;
    }
}
<?php

namespace Expressly\Event;

use Symfony\Component\EventDispatcher\Event;

class ResponseEvent extends Event
{
    private $response;

    public function getResponse()
    {
        return is_array($this->response) ? $this->response : json_decode($this->response, true);
    }

    public function setResponse($response)
    {
        $this->response = $response;

        return $this;
    }
}
Change order of json_decode within Response
Change order of json_decode within Response
