Skip to content

Commit

Permalink
fix: errors after phpstan lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kolotov committed Sep 9, 2023
1 parent 92bd19d commit 1486418
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function runGame(array $module, int $correctAnswerCounter = 0): void
[$question, $correctAnswer] = getQuestionAnswerPairHandler($module);
line(getText($module, 'prompts.question', ['[question]' => $question]));
$userAnswer = prompt(getText($module, 'prompts.answer'));
$isValidAnswer = $correctAnswer === $userAnswer;
$isValidAnswer = (string)$correctAnswer === $userAnswer;

/** Game over */
if (!$isValidAnswer) {
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/ModuleUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @return array{
* 0: string,
* 1: string
* 1: mixed
* }
*/
function getQuestionAnswerPairHandler(array $module): array
Expand Down

0 comments on commit 1486418

Please sign in to comment.