Skip to content

[CLEANUP] Rector: Add strict return type based on returned strict expr type #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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