We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 761fc6d commit ebdecb9Copy full SHA for ebdecb9
src/Exercise/UniteTheTypes.php
@@ -65,15 +65,14 @@ function (): string {
65
public function getPatch(): Patch
66
{
67
$code = <<<'CODE'
68
- declare(strict_types=1);
69
-
70
- $argv = array_map(function ($value) {
+ $first = array_shift($argv);
+ $argv = array_merge([$first], array_map(function ($value) {
71
return match (true) {
72
(int) $value != (float) $value => (float) $value,
73
(bool) random_int(0, 1) => (int) $value,
74
default => (string) $value
75
};
76
- }, $argv);
+ }, $argv));
77
CODE;
78
79
$casterInsertion = new CodeInsertion(CodeInsertion::TYPE_BEFORE, $code);
0 commit comments