src/Api.php
private function decode(array $response)
    {
        $decodedBody = json_decode($response['body'], true);

        if (null === $decodedBody) {
            return new WP_Error('decode-error', 'Unable to decode response body', $response);
        }

        if (true !== $decodedBody['success']) {
            return $this->wpErrorFor($decodedBody['errors'], $response);
        }

        return $response;
    }
private function decode(array $response)
    {
        $decodedBody = json_decode($response['body'], true);

        if (null === $decodedBody) {
            return new WP_Error('decode-error', 'Unable to decode response body', $response);
        }

        if (true !== $decodedBody['success']) {
            return $this->wpErrorFor($decodedBody['errors'], $response);
        }

        return $response;
    }
private function decode ( array $ response ) { $ decodedBody = json_decode ( $ response [ 'body' ] , true ) ; if ( null === $ decodedBody ) { return new WP_Error ( 'decode-error' , 'Unable to decode response body' , $ response ) ; } if ( true !== $ decodedBody [ 'success' ] ) { return $ this -> wpErrorFor ( $ decodedBody [ 'errors' ] , $ response ) ; } return $ response ; }
Decode Cloudflare response.

@param array $response The response from Cloudflare.

@return array|WP_Error
Decode Cloudflare response .