<?php

use App\Modules\IpStack\Repositories\IpStackRepository;

/**
 * Check if a client IP is in our Server subnet
 */
function isLocalIp(string $ip = ''): bool
{
    return IpStackRepository::isLocalIp($ip);
}

/**
 * Get country code from ip
 */
function getCountryCodeFromIp(?string $ip = ''): string
{
    return IpStackRepository::getCountryCodeFromIp($ip);
}
