src/Executor/ReferenceExecutor.php
private function buildResponse($data)
    {
        if ($this->isPromise($data)) {
            return $data->then(function ($resolved) {
                return $this->buildResponse($resolved);
            });
        }
        if ($data !== null) {
            $data = (array) $data;
        }

        return new ExecutionResult($data, $this->exeContext->errors);
    }
private function buildResponse($data)
    {
        if ($this->isPromise($data)) {
            return $data->then(function ($resolved) {
                return $this->buildResponse($resolved);
            });
        }
        if ($data !== null) {
            $data = (array) $data;
        }

        return new ExecutionResult($data, $this->exeContext->errors);
    }
private function buildResponse ( $ data ) { if ( $ this -> isPromise ( $ data ) ) { return $ data -> then ( function ( $ resolved ) { return $ this -> buildResponse ( $ resolved ) ; } ) ; } if ( $ data !== null ) { $ data = ( array ) $ data ; } return new ExecutionResult ( $ data , $ this -> exeContext -> errors ) ; }
@param mixed|Promise|null $data

@return ExecutionResult|Promise
@param mixed|Promise|null $data