protected function findInPaths(array $paths, $group, $mode = null, $exists = false)
    {
        $items = [];

        foreach ($paths as $path) {
            if ($this->fs->exists($file = "{$path}/{$group}.php")) {
                if ($exists) return true;

                $items = array_merge_recursive($this->fs->getRequire($file), $items);
            }

            if ($mode and $this->fs->exists($file = "{$path}/{$mode}/{$group}.php")) {
                if ($exists) return true;

                $items = array_merge_recursive($this->fs->getRequire($file), $items);
            }
        }

        return $items;
    }