protected function hasParent(string $file = null): bool
    {
        if (isset($file)) {
            return in_array($file, $this->parents, true);
        }
        return !empty($this->parents);
    }