Skip to content

Commit ea2480d

Browse files
committed
Prefix all sprintf() calls
1 parent e1fbbfb commit ea2480d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

HttpHeaderSerializer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ public function serialize(iterable $links): ?string
3535
continue;
3636
}
3737

38-
$attributesParts = ['', sprintf('rel="%s"', implode(' ', $link->getRels()))];
38+
$attributesParts = ['', \sprintf('rel="%s"', implode(' ', $link->getRels()))];
3939
foreach ($link->getAttributes() as $key => $value) {
4040
if (\is_array($value)) {
4141
foreach ($value as $v) {
42-
$attributesParts[] = sprintf('%s="%s"', $key, preg_replace('/(?<!\\\\)"/', '\"', $v));
42+
$attributesParts[] = \sprintf('%s="%s"', $key, preg_replace('/(?<!\\\\)"/', '\"', $v));
4343
}
4444

4545
continue;
4646
}
4747

4848
if (!\is_bool($value)) {
49-
$attributesParts[] = sprintf('%s="%s"', $key, preg_replace('/(?<!\\\\)"/', '\"', $value));
49+
$attributesParts[] = \sprintf('%s="%s"', $key, preg_replace('/(?<!\\\\)"/', '\"', $value));
5050

5151
continue;
5252
}
@@ -56,7 +56,7 @@ public function serialize(iterable $links): ?string
5656
}
5757
}
5858

59-
$elements[] = sprintf('<%s>%s', $link->getHref(), implode('; ', $attributesParts));
59+
$elements[] = \sprintf('<%s>%s', $link->getHref(), implode('; ', $attributesParts));
6060
}
6161

6262
return $elements ? implode(',', $elements) : null;

0 commit comments

Comments
 (0)