Skip to content

Commit 26571cc

Browse files
committed
project check. ALL edition(8)
1 parent fc663c9 commit 26571cc

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "hexlet/code",
33
"license": "MIT",
44
"description": "Brain training games collection",
5+
"type": "project",
56
"autoload": {
67
"psr-4": {
78
"Hexlet\\Code\\": "src/"
@@ -35,5 +36,7 @@
3536
},
3637
"require-dev": {
3738
"squizlabs/php_codesniffer": "^3.13"
38-
}
39+
},
40+
"minimum-stability": "dev",
41+
"prefer-stable": true
3942
}

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Engine.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ function startGame(array $gameParams): void
1414
line($rules);
1515
for ($i = 0; $i < count($questions); $i++) {
1616
$answer = prompt("Question: {$questions[$i]}");
17-
//$answer = is_string($expectedAnswer[$i]) ? $answer : (int)$answer;
1817
line("Your answer: {$answer}");
1918
if ($answer !== (string)$expectedAnswer[$i]) {
2019
line("{$answer} is wrong answer ;(. Correct answer was '{$expectedAnswer[$i]}'.");

src/Games/Calc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ function calculate(int $a, int $b, string $operator): int
3030
case '-':
3131
$result = $a - $b;
3232
break;
33+
case '*':
34+
$result = $a * $b;
35+
break;
3336
default:
3437
$result = 0;
3538
}

0 commit comments

Comments
 (0)