Skip to content

Commit aa7ddb9

Browse files
committed
[WebLink] Add type doc for link attributes
1 parent dff2ff8 commit aa7ddb9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Symfony/Component/WebLink/Link.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ public function getRels(): array
175175
return array_values($this->rel);
176176
}
177177

178+
/**
179+
* Returns a list of attributes that describe the target URI.
180+
*
181+
* @return array<string, scalar|\Stringable|list<scalar|\Stringable>>
182+
*/
178183
public function getAttributes(): array
179184
{
180185
return $this->attributes;
@@ -204,6 +209,14 @@ public function withoutRel(string $rel): static
204209
return $that;
205210
}
206211

212+
/**
213+
* Returns an instance with the specified attribute added.
214+
*
215+
* If the specified attribute is already present, it will be overwritten
216+
* with the new value.
217+
*
218+
* @param scalar|\Stringable|list<scalar|\Stringable> $value
219+
*/
207220
public function withAttribute(string $attribute, string|\Stringable|int|float|bool|array $value): static
208221
{
209222
$that = clone $this;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy