From 57c168c5d0104ee4d9fd44089e826554a0bfe8ac Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 7 Jan 2022 21:02:53 +0100 Subject: [PATCH] Small fix --- src/PhpDoc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpDoc.php b/src/PhpDoc.php index 3bfbbbb..136aa4c 100644 --- a/src/PhpDoc.php +++ b/src/PhpDoc.php @@ -590,7 +590,7 @@ class PhpDoc public function getFrontMatter(array $init = []): string { $result = ''; - foreach ($init + $this->frontMatter as $key => $value) { + foreach (\array_merge($init, $this->frontMatter) as $key => $value) { $result .= "$key: ".Escaper::escapeWithDoubleQuotes($value)."\n"; } return $result; @@ -606,7 +606,7 @@ class PhpDoc private function getIndexFrontMatter(array $init = []): string { $result = ''; - foreach ($init + $this->indexFrontMatter as $key => $value) { + foreach (\array_merge($init, $this->indexFrontMatter) as $key => $value) { $result .= "$key: ".Escaper::escapeWithDoubleQuotes($value)."\n"; } return $result;