Skip to content

Commit 474bf46

Browse files
committed
fix: remove arrow functions from EndToEndTest
1 parent 710e8eb commit 474bf46

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/EndToEndTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,8 +1447,11 @@ public function testLeast($args, $expected_value): void
14471447
$pdo = self::getPdo('mysql:host=localhost;dbname=testdb');
14481448
$pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
14491449

1450-
$args_str = implode(', ', array_map(fn ($arg) => is_null($arg) ? 'null' : strval($arg), $args));
1451-
$query = $pdo->prepare(sprintf('SELECT LEAST(%s) as result', $args_str),);
1450+
$args_str = implode(', ', array_map(function ($arg) {
1451+
return is_null($arg) ? 'null' : (string) $arg;
1452+
}, $args));
1453+
1454+
$query = $pdo->prepare(sprintf('SELECT LEAST(%s) as result', $args_str));
14521455
$query->execute();
14531456

14541457
$result = $query->fetch(\PDO::FETCH_ASSOC);

0 commit comments

Comments
 (0)