Skip to content

Commit cc53c85

Browse files
authored
[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 <[email protected]>
1 parent 1908a05 commit cc53c85

19 files changed

+19
-75
lines changed

src/CSSList/AtRuleBlockList.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ public function atRuleArgs()
4848
return $this->sArgs;
4949
}
5050

51-
/**
52-
* @return string
53-
*/
54-
public function __toString()
51+
public function __toString(): string
5552
{
5653
return $this->render(new OutputFormat());
5754
}

src/CSSList/CSSList.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,7 @@ public function removeDeclarationBlockBySelector($mSelector, $bRemoveAll = false
394394
}
395395
}
396396

397-
/**
398-
* @return string
399-
*/
400-
public function __toString()
397+
public function __toString(): string
401398
{
402399
return $this->render(new OutputFormat());
403400
}

src/CSSList/KeyFrame.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ public function getAnimationName()
5959
return $this->animationName;
6060
}
6161

62-
/**
63-
* @return string
64-
*/
65-
public function __toString()
62+
public function __toString(): string
6663
{
6764
return $this->render(new OutputFormat());
6865
}

src/Comment/Comment.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ public function setComment($sComment): void
5151
$this->sComment = $sComment;
5252
}
5353

54-
/**
55-
* @return string
56-
*/
57-
public function __toString()
54+
public function __toString(): string
5855
{
5956
return $this->render(new OutputFormat());
6057
}

src/Property/CSSNamespace.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ public function getLineNo()
5151
return $this->iLineNo;
5252
}
5353

54-
/**
55-
* @return string
56-
*/
57-
public function __toString()
54+
public function __toString(): string
5855
{
5956
return $this->render(new OutputFormat());
6057
}

src/Property/Charset.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ public function getCharset()
6969
return $this->oCharset->getString();
7070
}
7171

72-
/**
73-
* @return string
74-
*/
75-
public function __toString()
72+
public function __toString(): string
7673
{
7774
return $this->render(new OutputFormat());
7875
}

src/Property/Import.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ public function getLocation()
6868
return $this->oLocation;
6969
}
7070

71-
/**
72-
* @return string
73-
*/
74-
public function __toString()
71+
public function __toString(): string
7572
{
7673
return $this->render(new OutputFormat());
7774
}

src/Property/Selector.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,7 @@ public function setSelector($sSelector): void
113113
$this->iSpecificity = null;
114114
}
115115

116-
/**
117-
* @return string
118-
*/
119-
public function __toString()
116+
public function __toString(): string
120117
{
121118
return $this->getSelector();
122119
}

src/Rule/Rule.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,7 @@ public function getIsImportant()
247247
return $this->bIsImportant;
248248
}
249249

250-
/**
251-
* @return string
252-
*/
253-
public function __toString()
250+
public function __toString(): string
254251
{
255252
return $this->render(new OutputFormat());
256253
}

src/RuleSet/AtRuleSet.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ public function atRuleArgs()
5151
return $this->sArgs;
5252
}
5353

54-
/**
55-
* @return string
56-
*/
57-
public function __toString()
54+
public function __toString(): string
5855
{
5956
return $this->render(new OutputFormat());
6057
}

src/RuleSet/DeclarationBlock.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -775,11 +775,9 @@ public function createFontShorthand(): void
775775
}
776776

777777
/**
778-
* @return string
779-
*
780778
* @throws OutputException
781779
*/
782-
public function __toString()
780+
public function __toString(): string
783781
{
784782
return $this->render(new OutputFormat());
785783
}

src/RuleSet/RuleSet.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,7 @@ public function removeRule($mRule): void
252252
}
253253
}
254254

255-
/**
256-
* @return string
257-
*/
258-
public function __toString()
255+
public function __toString(): string
259256
{
260257
return $this->render(new OutputFormat());
261258
}

src/Value/CSSFunction.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,7 @@ public function getArguments()
9696
return $this->aComponents;
9797
}
9898

99-
/**
100-
* @return string
101-
*/
102-
public function __toString()
99+
public function __toString(): string
103100
{
104101
return $this->render(new OutputFormat());
105102
}

src/Value/CSSString.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,7 @@ public function getString()
8686
return $this->sString;
8787
}
8888

89-
/**
90-
* @return string
91-
*/
92-
public function __toString()
89+
public function __toString(): string
9390
{
9491
return $this->render(new OutputFormat());
9592
}

src/Value/Color.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,7 @@ public function getColorDescription()
144144
return $this->getName();
145145
}
146146

147-
/**
148-
* @return string
149-
*/
150-
public function __toString()
147+
public function __toString(): string
151148
{
152149
return $this->render(new OutputFormat());
153150
}

src/Value/LineName.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ public static function parse(ParserState $oParserState): LineName
4545
return new LineName($aNames, $oParserState->currentLine());
4646
}
4747

48-
/**
49-
* @return string
50-
*/
51-
public function __toString()
48+
public function __toString(): string
5249
{
5350
return $this->render(new OutputFormat());
5451
}

src/Value/Size.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,7 @@ public function isRelative(): bool
194194
return false;
195195
}
196196

197-
/**
198-
* @return string
199-
*/
200-
public function __toString()
197+
public function __toString(): string
201198
{
202199
return $this->render(new OutputFormat());
203200
}

src/Value/URL.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ public function getURL()
7272
return $this->oURL;
7373
}
7474

75-
/**
76-
* @return string
77-
*/
78-
public function __toString()
75+
public function __toString(): string
7976
{
8077
return $this->render(new OutputFormat());
8178
}

src/Value/ValueList.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ public function setListSeparator($sSeparator): void
7777
$this->sSeparator = $sSeparator;
7878
}
7979

80-
/**
81-
* @return string
82-
*/
83-
public function __toString()
80+
public function __toString(): string
8481
{
8582
return $this->render(new OutputFormat());
8683
}

0 commit comments

Comments
 (0)