src/Transport/Http.php
private function isSuccessful(Response $response): bool
    {
        if ($response->statusCode()->value() !== 200) {
            return false;
        }

        $json = Json::decode((string) $response->body());

        return count($json['errors']) === 0;
    }
private function isSuccessful(Response $response): bool
    {
        if ($response->statusCode()->value() !== 200) {
            return false;
        }

        $json = Json::decode((string) $response->body());

        return count($json['errors']) === 0;
    }
private function isSuccessful ( Response $ response ) : bool { if ( $ response -> statusCode ( ) -> value ( ) !== 200 ) { return false ; } $ json = Json :: decode ( ( string ) $ response -> body ( ) ) ; return count ( $ json [ 'errors' ] ) === 0 ; }
Check if the response is successful

@param Response $response

@return bool
Check if the response is successful