Skip to content

Commit a2ac14f

Browse files
authored
[CLEANUP] Rector: Add strict return type based on returned strict expr type (#581)
This applies the rule ReturnTypeFromStrictBoolReturnExprRector. For Details see: https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#returntypefromstrictboolreturnexprrector Signed-off-by: Daniel Ziegenberg <[email protected]>
1 parent 6aebe9d commit a2ac14f

File tree

6 files changed

+6
-22
lines changed

6 files changed

+6
-22
lines changed

src/CSSList/AtRuleBlockList.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ public function render(OutputFormat $oOutputFormat)
7474
return $sResult;
7575
}
7676

77-
/**
78-
* @return bool
79-
*/
80-
public function isRootList()
77+
public function isRootList(): bool
8178
{
8279
return false;
8380
}

src/CSSList/Document.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,7 @@ public function render(OutputFormat $oOutputFormat = null)
155155
return $oOutputFormat->comments($this) . $this->renderListContents($oOutputFormat);
156156
}
157157

158-
/**
159-
* @return bool
160-
*/
161-
public function isRootList()
158+
public function isRootList(): bool
162159
{
163160
return true;
164161
}

src/CSSList/KeyFrame.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@ public function render(OutputFormat $oOutputFormat)
7979
return $sResult;
8080
}
8181

82-
/**
83-
* @return bool
84-
*/
85-
public function isRootList()
82+
public function isRootList(): bool
8683
{
8784
return false;
8885
}

src/Parsing/ParserState.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,8 @@ private function inputLeft()
427427
* @param string $sString1
428428
* @param string $sString2
429429
* @param bool $bCaseInsensitive
430-
*
431-
* @return bool
432430
*/
433-
public function streql($sString1, $sString2, $bCaseInsensitive = true)
431+
public function streql($sString1, $sString2, $bCaseInsensitive = true): bool
434432
{
435433
if ($bCaseInsensitive) {
436434
return $this->strtolower($sString1) === $this->strtolower($sString2);

src/RuleSet/DeclarationBlock.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,8 @@ public function setSelectors($mSelector, $oList = null)
129129
* Remove one of the selectors of the block.
130130
*
131131
* @param Selector|string $mSelector
132-
*
133-
* @return bool
134132
*/
135-
public function removeSelector($mSelector)
133+
public function removeSelector($mSelector): bool
136134
{
137135
if ($mSelector instanceof Selector) {
138136
$mSelector = $mSelector->getSelector();

src/Value/Size.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,7 @@ public function isSize()
187187
return !$this->isColorComponent();
188188
}
189189

190-
/**
191-
* @return bool
192-
*/
193-
public function isRelative()
190+
public function isRelative(): bool
194191
{
195192
if (in_array($this->sUnit, self::RELATIVE_SIZE_UNITS, true)) {
196193
return true;

0 commit comments

Comments
 (0)