private function phpInput(array $server) : array
    {
        $contentType = $this->getContentType($server);
        $isFormUrlEncoded = strpos($contentType, self::FORM_URL_ENCODE) !== false;
        if ($isFormUrlEncoded) {
            parse_str(rtrim($this->getRawBody($server)), $put);

            return $put;
        }
        $isApplicationJson = strpos($contentType, self::APPLICATION_JSON) !== false;
        if (! $isApplicationJson) {
            return [];
        }
        $content = json_decode($this->getRawBody($server), true);
        $error = json_last_error();
        if ($error !== JSON_ERROR_NONE) {
            throw new InvalidRequestJsonException(json_last_error_msg());
        }

        return $content;
    }