public function getCurrentModuleDependencies($recursive = false)
    {
        if (empty($this->moduleDescriptor->required)) {
            return [];
        }

        $dependencies = [];
        foreach ($this->moduleDescriptor->required->module as $dependency) {
            $dependencyArray = [
                "code" => (string)$dependency,
                "version" => (string)$dependency['version'],
            ];
            if (!\in_array($dependencyArray, $dependencies)) {
                $dependencies[] = $dependencyArray;
            }

            if ($recursive) {
                $recursiveModuleValidator = new ModuleValidator(THELIA_MODULE_DIR . '/' . (string)$dependency);
                array_merge(
                    $dependencies,
                    $recursiveModuleValidator->getCurrentModuleDependencies(true)
                );
            }
        }

        return $dependencies;
    }