Skip to content

Commit

Permalink
[CLEANUP] Rector: Add strict return type based on returned strict exp…
Browse files Browse the repository at this point in the history
…r type (MyIntervals#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]>
  • Loading branch information
ziegenberg authored Jun 19, 2024
1 parent 6aebe9d commit a2ac14f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 22 deletions.
5 changes: 1 addition & 4 deletions src/CSSList/AtRuleBlockList.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ public function render(OutputFormat $oOutputFormat)
return $sResult;
}

/**
* @return bool
*/
public function isRootList()
public function isRootList(): bool
{
return false;
}
Expand Down
5 changes: 1 addition & 4 deletions src/CSSList/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,7 @@ public function render(OutputFormat $oOutputFormat = null)
return $oOutputFormat->comments($this) . $this->renderListContents($oOutputFormat);
}

/**
* @return bool
*/
public function isRootList()
public function isRootList(): bool
{
return true;
}
Expand Down
5 changes: 1 addition & 4 deletions src/CSSList/KeyFrame.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ public function render(OutputFormat $oOutputFormat)
return $sResult;
}

/**
* @return bool
*/
public function isRootList()
public function isRootList(): bool
{
return false;
}
Expand Down
4 changes: 1 addition & 3 deletions src/Parsing/ParserState.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,8 @@ private function inputLeft()
* @param string $sString1
* @param string $sString2
* @param bool $bCaseInsensitive
*
* @return bool
*/
public function streql($sString1, $sString2, $bCaseInsensitive = true)
public function streql($sString1, $sString2, $bCaseInsensitive = true): bool
{
if ($bCaseInsensitive) {
return $this->strtolower($sString1) === $this->strtolower($sString2);
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/DeclarationBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,8 @@ public function setSelectors($mSelector, $oList = null)
* Remove one of the selectors of the block.
*
* @param Selector|string $mSelector
*
* @return bool
*/
public function removeSelector($mSelector)
public function removeSelector($mSelector): bool
{
if ($mSelector instanceof Selector) {
$mSelector = $mSelector->getSelector();
Expand Down
5 changes: 1 addition & 4 deletions src/Value/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,7 @@ public function isSize()
return !$this->isColorComponent();
}

/**
* @return bool
*/
public function isRelative()
public function isRelative(): bool
{
if (in_array($this->sUnit, self::RELATIVE_SIZE_UNITS, true)) {
return true;
Expand Down

0 comments on commit a2ac14f

Please sign in to comment.