Skip to content

Commit 6c5a31e

Browse files
Fix code style
1 parent cf22ac8 commit 6c5a31e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/Support/SupportArrTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -998,30 +998,30 @@ public function testMapKeys()
998998
{
999999
// Basic transformation
10001000
$array = ['first_name' => 'Taylor', 'last_name' => 'Otwell'];
1001-
$result = Arr::mapKeys($array, fn($key) => Str::camel($key));
1001+
$result = Arr::mapKeys($array, fn ($key) => Str::camel($key));
10021002
$this->assertEquals(['firstName' => 'Taylor', 'lastName' => 'Otwell'], $result);
10031003

10041004
// With value parameter
10051005
$array = ['name' => 'Taylor', 'age' => 31];
1006-
$result = Arr::mapKeys($array, fn($key, $value) => is_numeric($value) ? "num_{$key}" : $key);
1006+
$result = Arr::mapKeys($array, fn ($key, $value) => is_numeric($value) ? "num_{$key}" : $key);
10071007
$this->assertEquals(['name' => 'Taylor', 'num_age' => 31], $result);
10081008

10091009
// Key collision - last wins
10101010
$array = ['name' => 'First', 'NAME' => 'Second'];
1011-
$result = Arr::mapKeys($array, fn($key) => strtolower($key));
1011+
$result = Arr::mapKeys($array, fn ($key) => strtolower($key));
10121012
$this->assertEquals(['name' => 'Second'], $result);
10131013

10141014
// Empty array
10151015
$this->assertEquals([], Arr::mapKeys([], fn($key) => $key));
10161016

10171017
// Numeric keys
10181018
$array = [1, 2, 3];
1019-
$result = Arr::mapKeys($array, fn($key) => "item_{$key}");
1019+
$result = Arr::mapKeys($array, fn ($key) => "item_{$key}");
10201020
$this->assertEquals(['item_0' => 1, 'item_1' => 2, 'item_2' => 3], $result);
10211021

10221022
// Prefix example
10231023
$config = ['host' => 'localhost', 'port' => 3306, 'database' => 'app'];
1024-
$result = Arr::mapKeys($config, fn($key) => "db_{$key}");
1024+
$result = Arr::mapKeys($config, fn ($key) => "db_{$key}");
10251025
$this->assertEquals(['db_host' => 'localhost', 'db_port' => 3306, 'db_database' => 'app'], $result);
10261026
}
10271027

0 commit comments

Comments
 (0)