Skip to content

Commit

Permalink
phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
sowbiba committed Feb 16, 2024
1 parent 7f42a1e commit e758524
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/DependencyBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -400,11 +404,7 @@ private function getDependenciesSpecification()
}

/**
* @return array{
* "dependencies": array<string, string|int|bool>
* }
*
* @throws \Exception
* @return array<string, string>
*/
private function getHelpUrlSpecification()
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e758524

Please sign in to comment.