Skip to content

Commit

Permalink
[BUGFIX] Ignore phpstan error
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbelasichon committed Apr 9, 2021
1 parent d5897a7 commit fafab22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testGetRectorClassWithChangelogUrl(): void
1
);
$this->assertSame(
'Rector\Tests\ChangesReporting\ValueObject\Source\RectorWithLink (https://github.com/rectorphp/rector/blob/master/docs/rector_rules_overview.md)',
'"Rector\Tests\ChangesReporting\ValueObject\Source\RectorWithLink" ("https://github.com/rectorphp/rector/blob/master/docs/rector_rules_overview.md")',
$rectorWithFileAndLineChange->getRectorClassWithChangelogUrl()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public function getRectorClassWithChangelogUrl(): string
{
$rectorClass = get_class($this->rector);

/* @phpstan-ignore-next-line */
$rectorReflection = new ReflectionClass($rectorClass);

$docComment = $rectorReflection->getDocComment();
Expand All @@ -65,7 +66,7 @@ public function getRectorClassWithChangelogUrl(): string
return $rectorClass;
}

return sprintf('%s (%s)', $rectorClass, trim((string) $matches['url']));
return sprintf('"%s" ("%s")', $rectorClass, trim((string) $matches['url']));
}

public function getLine(): int
Expand Down

0 comments on commit fafab22

Please sign in to comment.