Skip to content

Commit 79978db

Browse files
committed
Replace function chain to a single call.
1 parent a95fe36 commit 79978db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/HeaderBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __toString()
4646
$max = max(array_map('strlen', array_keys($headers))) + 1;
4747
$content = '';
4848
foreach ($headers as $name => $values) {
49-
$name = implode('-', array_map('ucfirst', explode('-', $name)));
49+
$name = ucwords($name, '-');
5050
foreach ($values as $value) {
5151
$content .= sprintf("%-{$max}s %s\r\n", $name.':', $value);
5252
}

0 commit comments

Comments
 (0)