From ef998c387f044d404d9bcf4ccfa7fe59c8b2659d Mon Sep 17 00:00:00 2001 From: yuzhuang Date: Fri, 10 Mar 2023 09:47:21 +0800 Subject: [PATCH] fix(Rewrite): return type of `writeArrayToPhp()` should be `string` --- src/DataWriter/Rewrite.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/DataWriter/Rewrite.php b/src/DataWriter/Rewrite.php index 7f4b467..25301bc 100644 --- a/src/DataWriter/Rewrite.php +++ b/src/DataWriter/Rewrite.php @@ -132,7 +132,7 @@ protected function writeValueToPhp($value): string return $replaceValue; } - protected function writeArrayToPhp(array $array): array + protected function writeArrayToPhp(array $array): string { $result = []; @@ -143,8 +143,6 @@ protected function writeArrayToPhp(array $array): array } return '['.implode(', ', $result).']'; - - return $result; } protected function buildStringExpression(string $targetKey, array $arrayItems = [], string $quoteChar = "'"): string