From cc53c8536203a8b7f1caccd4790b796b011fe270 Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Mon, 24 Jun 2024 14:41:00 +0200 Subject: [PATCH] [CLEANUP] Rector: Add missing return type declaration based on parent class method (#606) 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 eb921ed8..cd5f27ab 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 43350ade..bbabd5d8 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 be41718c..557c3e74 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 04edb18f..c698018a 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 1f16b41d..dd687cd7 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 99c6ce5e..7c3a7f6a 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 548848b7..b1e609d7 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 cd0666cc..62a60c61 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 1bec2e1c..434440a7 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 1da45fb7..6cc97e4d 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 1e2e62ba..44b1bb6a 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 db7aef68..37a313ee 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 6cc6b6ae..7ee7b91d 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 a0868a9a..59b64403 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 09ae46e3..00876db1 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 b4ba6b44..5c83b565 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 065a8918..303b9b0c 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 548b573e..b56f1288 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 5404d3e8..973a0780 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()); }