MageScan\Check\Patch\MageReport::parseResponse PHP Method

parseResponse() protected method

Derive if patched or not based on the response
protected parseResponse ( Response $response ) : string
$response GuzzleHttp\Psr7\Response
return string
    protected function parseResponse(Response $response)
    {
        $body = json_decode($response->getBody());
        if (is_object($body)) {
            switch ($body->result) {
                case self::RESULT_SUCCESS:
                    return Patch::PATCHED;
                case self::RESULT_FAIL:
                    return Patch::UNPATCHED;
            }
        }
        return Patch::UNKNOWN;
    }