protected function matchesFilter(array $filter): bool
    {
        foreach ($filter as $key => $comp) {
            $value = ($this->$key ?? null);
            $match = is_scalar($value) && is_scalar($comp) ? (string)$value === (string)$comp : $value === $comp;

            if (!$match) {
                return false;
            }
        }

        return true;
    }