Skip to content

Commit

Permalink
Annotate internal config array generics
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Oct 29, 2023
1 parent a03ca55 commit ceb238f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ protected function hasYamlConfigFile(): bool
|| file_exists(Hyde::path('hyde.yaml'));
}

/** @return array<string, mixed> */
protected function getYaml(): array
{
return (array) Yaml::parse(file_get_contents($this->getFile()));
Expand All @@ -64,6 +65,7 @@ protected function mergeParsedConfiguration(): void
// If the Yaml file contains namespaces, we merge those using more granular logic
// that only applies the namespace data to each configuration namespace.
if ($this->configurationContainsNamespaces($yaml)) {
/** @var array<string, array<string, scalar>> $yaml */
foreach ($yaml as $namespace => $data) {
$this->mergeConfiguration($namespace, (array) $data);
}
Expand Down

0 comments on commit ceb238f

Please sign in to comment.