From be0ac414af850282f99a292fb9b06abf754bc488 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 13 Mar 2025 17:55:11 +0100 Subject: [PATCH] [TASK] Add native return type for `render*` methods Part of #811 --- CHANGELOG.md | 2 +- src/CSSList/CSSList.php | 5 +---- src/RuleSet/RuleSet.php | 5 +---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1db80aff..83d7f258 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ Please also have a look at our - Use more native type declarations and strict mode (#641, #772, #774, #778, #804, #841, #873, #875, #891, #922, #923, #933, #958, #964, #967, #1000, #1044, #1134, #1136, #1137, #1139, #1140, #1141, #1145, - #1162, #1163) + #1162, #1163, #1166) - Add visibility to all class/interface constants (#469) ### Deprecated diff --git a/src/CSSList/CSSList.php b/src/CSSList/CSSList.php index 15a5e87a..04332bc7 100644 --- a/src/CSSList/CSSList.php +++ b/src/CSSList/CSSList.php @@ -408,10 +408,7 @@ public function __toString(): string return $this->render(new OutputFormat()); } - /** - * @return string - */ - protected function renderListContents(OutputFormat $outputFormat) + protected function renderListContents(OutputFormat $outputFormat): string { $result = ''; $isFirst = true; diff --git a/src/RuleSet/RuleSet.php b/src/RuleSet/RuleSet.php index a972dfd5..311f06be 100644 --- a/src/RuleSet/RuleSet.php +++ b/src/RuleSet/RuleSet.php @@ -269,10 +269,7 @@ public function __toString(): string return $this->render(new OutputFormat()); } - /** - * @return string - */ - protected function renderRules(OutputFormat $outputFormat) + protected function renderRules(OutputFormat $outputFormat): string { $result = ''; $isFirst = true;