Skip to content

Commit 87a01cd

Browse files
Add return types - batch 1/n
1 parent 326fc05 commit 87a01cd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

GenericLinkProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function getLinksByRel(string $rel): array
6464
*
6565
* @return static
6666
*/
67-
public function withLink(LinkInterface $link)
67+
public function withLink(LinkInterface $link): static
6868
{
6969
$that = clone $this;
7070
$that->links[spl_object_id($link)] = $link;
@@ -77,7 +77,7 @@ public function withLink(LinkInterface $link)
7777
*
7878
* @return static
7979
*/
80-
public function withoutLink(LinkInterface $link)
80+
public function withoutLink(LinkInterface $link): static
8181
{
8282
$that = clone $this;
8383
unset($that->links[spl_object_id($link)]);

Link.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function getAttributes(): array
9595
*
9696
* @return static
9797
*/
98-
public function withHref(string|\Stringable $href)
98+
public function withHref(string|\Stringable $href): static
9999
{
100100
$that = clone $this;
101101
$that->href = $href;
@@ -108,7 +108,7 @@ public function withHref(string|\Stringable $href)
108108
*
109109
* @return static
110110
*/
111-
public function withRel(string $rel)
111+
public function withRel(string $rel): static
112112
{
113113
$that = clone $this;
114114
$that->rel[$rel] = $rel;
@@ -121,7 +121,7 @@ public function withRel(string $rel)
121121
*
122122
* @return static
123123
*/
124-
public function withoutRel(string $rel)
124+
public function withoutRel(string $rel): static
125125
{
126126
$that = clone $this;
127127
unset($that->rel[$rel]);
@@ -134,7 +134,7 @@ public function withoutRel(string $rel)
134134
*
135135
* @return static
136136
*/
137-
public function withAttribute(string $attribute, string|\Stringable|int|float|bool|array $value)
137+
public function withAttribute(string $attribute, string|\Stringable|int|float|bool|array $value): static
138138
{
139139
$that = clone $this;
140140
$that->attributes[$attribute] = $value;
@@ -147,7 +147,7 @@ public function withAttribute(string $attribute, string|\Stringable|int|float|bo
147147
*
148148
* @return static
149149
*/
150-
public function withoutAttribute(string $attribute)
150+
public function withoutAttribute(string $attribute): static
151151
{
152152
$that = clone $this;
153153
unset($that->attributes[$attribute]);

0 commit comments

Comments
 (0)