From ceb238f1bb2820dace2d0bec9b4b0532fb3b260d Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sun, 29 Oct 2023 12:59:28 +0100 Subject: [PATCH] Annotate internal config array generics --- .../framework/src/Foundation/Internal/LoadYamlConfiguration.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/framework/src/Foundation/Internal/LoadYamlConfiguration.php b/packages/framework/src/Foundation/Internal/LoadYamlConfiguration.php index 47fb8f6673b..59fcc1daac9 100644 --- a/packages/framework/src/Foundation/Internal/LoadYamlConfiguration.php +++ b/packages/framework/src/Foundation/Internal/LoadYamlConfiguration.php @@ -45,6 +45,7 @@ protected function hasYamlConfigFile(): bool || file_exists(Hyde::path('hyde.yaml')); } + /** @return array */ protected function getYaml(): array { return (array) Yaml::parse(file_get_contents($this->getFile())); @@ -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> $yaml */ foreach ($yaml as $namespace => $data) { $this->mergeConfiguration($namespace, (array) $data); }