Skip to content

Commit

Permalink
fix(static-analysis): fix MixedArgumentTypeCoercion issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsey committed May 29, 2020
1 parent 6f090fe commit 2d4f0ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Skeleton/Task/Builder/UpdateReadme.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ public function build(): void
'/<!-- COPYRIGHT_START -->(.*)<!-- COPYRIGHT_END -->/s' => $this->getCopyright(),
];

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

/** @var string[] $replaces */
$replaces = array_values($replacements);

$readme = (string) preg_replace(
array_keys($replacements),
array_values($replacements),
$searches,
$replaces,
$readmeContents
);

Expand Down
1 change: 1 addition & 0 deletions src/Skeleton/Task/Question.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ final public function replaceTokens(string $value): string
return "{{ {$key} }}";
}, $this->getAnswers()->getTokens());

/** @var string[] $replacements */
$replacements = $this->getAnswers()->getValues();

/**
Expand Down

0 comments on commit 2d4f0ea

Please sign in to comment.