public function make(ErrorSerializer $serializer, $errorCode = null, string $message = null, array $data = null): array
    {
        if (isset($errorCode) && ! isset($message)) {
            $message = $this->messageResolver->resolve($errorCode);
        }

        return $serializer->format($errorCode, $message, $data);
    }
public function make(ErrorSerializer $serializer, $errorCode = null, string $message = null, array $data = null): array
    {
        if (isset($errorCode) && ! isset($message)) {
            $message = $this->messageResolver->resolve($errorCode);
        }

        return $serializer->format($errorCode, $message, $data);
    }
public function make ( ErrorSerializer $ serializer , $ errorCode = null , string $ message = null , array $ data = null ) : array { if ( isset ( $ errorCode ) && ! isset ( $ message ) ) { $ message = $ this -> messageResolver -> resolve ( $ errorCode ) ; } return $ serializer -> format ( $ errorCode , $ message , $ data ) ; }
Make an error array from the given error code and message.

@param  \Flugg\Responder\Contracts\ErrorSerializer $serializer
@param  mixed|null                                 $errorCode
@param  string|null                                $message
@param  array|null                                 $data
@return array
Make an error array from the given error code and message .