Skip to content

Commit

Permalink
[CLEANUP] Rector: Add strict return type based native function or cla…
Browse files Browse the repository at this point in the history
…ss method return (MyIntervals#602)

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

Signed-off-by: Daniel Ziegenberg <[email protected]>
  • Loading branch information
ziegenberg authored Jun 21, 2024
1 parent b3a5b52 commit 3a34389
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/OutputFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ public function __construct(OutputFormat $oFormat)
/**
* @param string $sName
* @param string|null $sType
*
* @return string
*/
public function space($sName, $sType = null)
public function space($sName, $sType = null): string
{
$sSpaceString = $this->oFormat->get("Space$sName");
// If $sSpaceString is an array, we have multiple values configured
Expand Down Expand Up @@ -235,10 +233,8 @@ public function comments(Commentable $oCommentable): string

/**
* @param string $sSpaceString
*
* @return string
*/
private function prepareSpace($sSpaceString)
private function prepareSpace($sSpaceString): string
{
return str_replace("\n", "\n" . $this->indent(), $sSpaceString);
}
Expand Down

0 comments on commit 3a34389

Please sign in to comment.