8000 Update doctype and comment · symfony/symfony@4269a03 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4269a03

Browse files
committed
Update doctype and comment
1 parent df20840 commit 4269a03

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Symfony/Component/WebLink/HttpHeaderParser.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ public function parse(string|array $headers): EvolvableLinkProviderInterface
5555
// Quoted value, unescape quotes
5656
($pm[2] ?? '') !== '' => stripcslashes($pm[2]),
5757
($pm[3] ?? '') !== '' => $pm[3],
58+
// No value
5859
default => true,
5960
};
6061

6162
if ($key === 'rel') {
6263
// Only the first occurrence of the "rel" attribute is read
63-
$rels ??= $value === true ? [] : preg_split('/\s+/', $value, 0,\PREG_SPLIT_NO_EMPTY);
64+
$rels ??= $value === true ? [] : preg_split('/\s+/', $value, 0, \PREG_SPLIT_NO_EMPTY);
6465
} elseif (is_array($attributes[$key] ?? null)) {
6566
$attributes[$key][] = $value;
6667
} elseif (isset($attributes[$key])) {

src/Symfony/Component/WebLink/Link.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class Link implements EvolvableLinkInterface
153153
private array $rel = [];
154154

155155
/**
156-
* @var array<string, string|bool|string[]>
156+
* @var array<string, scalar|\Stringable|list<scalar|\Stringable>>
157157
*/
158158
private array $attributes = [];
159159

0 commit comments

Comments
 (0)
0