diff --git a/src/DependencyBuilder.php b/src/DependencyBuilder.php index 6910651..fc0d610 100644 --- a/src/DependencyBuilder.php +++ b/src/DependencyBuilder.php @@ -321,7 +321,11 @@ private function getDependencies($addRoutes = false) $dependencies = []; foreach ($dependenciesContent as $dependency) { - if (!is_array($dependency) || !array_key_exists('name', $dependency)) { + if ( + !is_array($dependency) + || !array_key_exists('name', $dependency) + || !is_string($dependency['name']) + ) { continue; } @@ -400,11 +404,7 @@ private function getDependenciesSpecification() } /** - * @return array{ - * "dependencies": array - * } - * - * @throws \Exception + * @return array */ private function getHelpUrlSpecification() { @@ -448,6 +448,10 @@ function (string $value, string $key) use (&$helpUrlSpecificationFormatted) { return $helpUrlSpecification; } + /** + * @return mixed|null + * @throws \Exception + */ private function getConfigFileContent() { $dependencyFile = $this->module->getLocalPath() . self::DEPENDENCY_FILENAME;