protected function wildcardHostCoversHost(string $wildcardHost, string $host) : bool
{
if ($host === $wildcardHost) {
return true;
}
if (!starts_with($wildcardHost, '*')) {
return false;
}
$wildcardHostWithoutWildcard = substr($wildcardHost, 2);
return ends_with($host, $wildcardHostWithoutWildcard);
}