Skip to content

Commit

Permalink
[CLEANUP] Rector: Add method return type based on strict ternary valu…
Browse files Browse the repository at this point in the history
…es (MyIntervals#588)

This applies the rule ReturnTypeFromStrictTernaryRector. For
Details see:
https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#returntypefromstrictternaryrector

Signed-off-by: Daniel Ziegenberg <[email protected]>
  • Loading branch information
ziegenberg authored Jun 19, 2024
1 parent 88f67b0 commit ab66cff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/CSSList/CSSList.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,8 @@ private static function parseAtRule(ParserState $oParserState)
*
* @param string $sIdentifier
* @param string $sMatch
*
* @return bool
*/
private static function identifierIs($sIdentifier, $sMatch)
private static function identifierIs($sIdentifier, $sMatch): bool
{
return (strcasecmp($sIdentifier, $sMatch) === 0)
?: preg_match("/^(-\\w+-)?$sMatch$/i", $sIdentifier) === 1;
Expand Down
4 changes: 1 addition & 3 deletions src/Parsing/ParserState.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,8 @@ public function consumeWhiteSpace(): array
/**
* @param string $sString
* @param bool $bCaseInsensitive
*
* @return bool
*/
public function comes($sString, $bCaseInsensitive = false)
public function comes($sString, $bCaseInsensitive = false): bool
{
$sPeek = $this->peek(strlen($sString));
return ($sPeek == '')
Expand Down

0 comments on commit ab66cff

Please sign in to comment.