Skip to content

Commit

Permalink
chore: update hints for static analysis with Psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsey committed Oct 27, 2023
1 parent 6d9fddc commit ff4cdd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/LibraryStarterKit/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ public function getTwigEnvironment(): TwigEnvironment
{
$pregReplaceFilter = new TwigFilter(
'preg_replace',
/**
* @param non-empty-string $p
*/
fn (string $s, string $p, string $r): string => (string) preg_replace($p, $r, $s),
);

Expand Down
2 changes: 1 addition & 1 deletion src/LibraryStarterKit/Task/Builder/UpdateReadme.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function build(): void
'/<!-- SECURITY_START -->(.*)<!-- SECURITY_END -->/s' => $this->getSecurityStatement(),
];

/** @var string[] $searches */
/** @var non-empty-string[] $searches */
$searches = array_keys($replacements);

/** @var string[] $replaces */
Expand Down

0 comments on commit ff4cdd9

Please sign in to comment.