private function isPathExcluded($path)
    {
        if ($this->excludedPath === '*') {
            return true;
        }

        if (empty($this->excludedPath) && !is_numeric($this->excludedPath)) {
            return false;
        }

        foreach ((array)$this->excludedPath as $excluded) {
            if (preg_match('@' . $excluded . '@', $path)) {
                return true;
            }
        }

        return false;
    }