From c0d97762adad00fa3a9662e6e300daf6d705c8f7 Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Fri, 21 Jun 2024 16:07:24 +0200 Subject: [PATCH] [CLEANUP] Rector: Add missing return type declaration based on parent class method This applies the rule AddReturnTypeDeclarationBasedOnParentClassMethodRector. For Details see: https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#addreturntypedeclarationbasedonparentclassmethodrector Signed-off-by: Daniel Ziegenberg --- src/CSSList/AtRuleBlockList.php | 5 +---- src/CSSList/CSSList.php | 5 +---- src/CSSList/KeyFrame.php | 5 +---- src/Comment/Comment.php | 5 +---- src/Property/CSSNamespace.php | 5 +---- src/Property/Charset.php | 5 +---- src/Property/Import.php | 5 +---- src/Property/Selector.php | 5 +---- src/Rule/Rule.php | 5 +---- src/RuleSet/AtRuleSet.php | 5 +---- src/RuleSet/DeclarationBlock.php | 4 +--- src/RuleSet/RuleSet.php | 5 +---- src/Value/CSSFunction.php | 5 +---- src/Value/CSSString.php | 5 +---- src/Value/Color.php | 5 +---- src/Value/LineName.php | 5 +---- src/Value/Size.php | 5 +---- src/Value/URL.php | 5 +---- src/Value/ValueList.php | 5 +---- 19 files changed, 19 insertions(+), 75 deletions(-) diff --git a/src/CSSList/AtRuleBlockList.php b/src/CSSList/AtRuleBlockList.php index eb921ed8b..cd5f27ab6 100644 --- a/src/CSSList/AtRuleBlockList.php +++ b/src/CSSList/AtRuleBlockList.php @@ -48,10 +48,7 @@ public function atRuleArgs() return $this->sArgs; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/CSSList/CSSList.php b/src/CSSList/CSSList.php index 43350ade2..bbabd5d8c 100644 --- a/src/CSSList/CSSList.php +++ b/src/CSSList/CSSList.php @@ -394,10 +394,7 @@ public function removeDeclarationBlockBySelector($mSelector, $bRemoveAll = false } } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/CSSList/KeyFrame.php b/src/CSSList/KeyFrame.php index be41718c9..557c3e74a 100644 --- a/src/CSSList/KeyFrame.php +++ b/src/CSSList/KeyFrame.php @@ -59,10 +59,7 @@ public function getAnimationName() return $this->animationName; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Comment/Comment.php b/src/Comment/Comment.php index 04edb18ff..c698018a6 100644 --- a/src/Comment/Comment.php +++ b/src/Comment/Comment.php @@ -51,10 +51,7 @@ public function setComment($sComment): void $this->sComment = $sComment; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Property/CSSNamespace.php b/src/Property/CSSNamespace.php index 1f16b41d7..dd687cd7d 100644 --- a/src/Property/CSSNamespace.php +++ b/src/Property/CSSNamespace.php @@ -51,10 +51,7 @@ public function getLineNo() return $this->iLineNo; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Property/Charset.php b/src/Property/Charset.php index 99c6ce5e8..7c3a7f6ad 100644 --- a/src/Property/Charset.php +++ b/src/Property/Charset.php @@ -69,10 +69,7 @@ public function getCharset() return $this->oCharset->getString(); } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Property/Import.php b/src/Property/Import.php index 548848b75..b1e609d73 100644 --- a/src/Property/Import.php +++ b/src/Property/Import.php @@ -68,10 +68,7 @@ public function getLocation() return $this->oLocation; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Property/Selector.php b/src/Property/Selector.php index cd0666cc8..62a60c61b 100644 --- a/src/Property/Selector.php +++ b/src/Property/Selector.php @@ -113,10 +113,7 @@ public function setSelector($sSelector): void $this->iSpecificity = null; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->getSelector(); } diff --git a/src/Rule/Rule.php b/src/Rule/Rule.php index 1bec2e1c1..434440a76 100644 --- a/src/Rule/Rule.php +++ b/src/Rule/Rule.php @@ -247,10 +247,7 @@ public function getIsImportant() return $this->bIsImportant; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/RuleSet/AtRuleSet.php b/src/RuleSet/AtRuleSet.php index 1da45fb74..6cc97e4dd 100644 --- a/src/RuleSet/AtRuleSet.php +++ b/src/RuleSet/AtRuleSet.php @@ -51,10 +51,7 @@ public function atRuleArgs() return $this->sArgs; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/RuleSet/DeclarationBlock.php b/src/RuleSet/DeclarationBlock.php index 1e2e62ba6..44b1bb6a3 100644 --- a/src/RuleSet/DeclarationBlock.php +++ b/src/RuleSet/DeclarationBlock.php @@ -775,11 +775,9 @@ public function createFontShorthand(): void } /** - * @return string - * * @throws OutputException */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/RuleSet/RuleSet.php b/src/RuleSet/RuleSet.php index db7aef686..37a313eef 100644 --- a/src/RuleSet/RuleSet.php +++ b/src/RuleSet/RuleSet.php @@ -252,10 +252,7 @@ public function removeRule($mRule): void } } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Value/CSSFunction.php b/src/Value/CSSFunction.php index 6cc6b6aed..7ee7b91d4 100644 --- a/src/Value/CSSFunction.php +++ b/src/Value/CSSFunction.php @@ -96,10 +96,7 @@ public function getArguments() return $this->aComponents; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Value/CSSString.php b/src/Value/CSSString.php index a0868a9a7..59b644033 100644 --- a/src/Value/CSSString.php +++ b/src/Value/CSSString.php @@ -86,10 +86,7 @@ public function getString() return $this->sString; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Value/Color.php b/src/Value/Color.php index 09ae46e3d..00876db1e 100644 --- a/src/Value/Color.php +++ b/src/Value/Color.php @@ -144,10 +144,7 @@ public function getColorDescription() return $this->getName(); } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Value/LineName.php b/src/Value/LineName.php index b4ba6b44e..5c83b5651 100644 --- a/src/Value/LineName.php +++ b/src/Value/LineName.php @@ -45,10 +45,7 @@ public static function parse(ParserState $oParserState): LineName return new LineName($aNames, $oParserState->currentLine()); } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Value/Size.php b/src/Value/Size.php index 065a89186..303b9b0c1 100644 --- a/src/Value/Size.php +++ b/src/Value/Size.php @@ -194,10 +194,7 @@ public function isRelative(): bool return false; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Value/URL.php b/src/Value/URL.php index 548b573e0..b56f1288b 100644 --- a/src/Value/URL.php +++ b/src/Value/URL.php @@ -72,10 +72,7 @@ public function getURL() return $this->oURL; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); } diff --git a/src/Value/ValueList.php b/src/Value/ValueList.php index 5404d3e86..973a0780c 100644 --- a/src/Value/ValueList.php +++ b/src/Value/ValueList.php @@ -77,10 +77,7 @@ public function setListSeparator($sSeparator): void $this->sSeparator = $sSeparator; } - /** - * @return string - */ - public function __toString() + public function __toString(): string { return $this->render(new OutputFormat()); }