Skip to content

Commit 0542cbc

Browse files
committed
Remove ReturnTypeWillChange
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent fff99fd commit 0542cbc

File tree

2 files changed

+7
-22
lines changed

2 files changed

+7
-22
lines changed

Crawler.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,20 +1071,15 @@ public function getNode(int $position)
10711071
return $this->nodes[$position] ?? null;
10721072
}
10731073

1074-
/**
1075-
* @return int
1076-
*/
1077-
#[\ReturnTypeWillChange]
1078-
public function count()
1074+
public function count(): int
10791075
{
10801076
return \count($this->nodes);
10811077
}
10821078

10831079
/**
1084-
* @return \ArrayIterator|\DOMNode[]
1080+
* @return \ArrayIterator<int, \DOMNode>
10851081
*/
1086-
#[\ReturnTypeWillChange]
1087-
public function getIterator()
1082+
public function getIterator(): \ArrayIterator
10881083
{
10891084
return new \ArrayIterator($this->nodes);
10901085
}

Form.php

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,8 @@ public function all()
301301
* Returns true if the named field exists.
302302
*
303303
* @param string $name The field name
304-
*
305-
* @return bool true if the field exists, false otherwise
306304
*/
307-
#[\ReturnTypeWillChange]
308-
public function offsetExists(mixed $name)
305+
public function offsetExists(mixed $name): bool
309306
{
310307
return $this->has($name);
311308
}
@@ -319,8 +316,7 @@ public function offsetExists(mixed $name)
319316
*
320317
* @throws \InvalidArgumentException if the field does not exist
321318
*/
322-
#[\ReturnTypeWillChange]
323-
public function offsetGet(mixed $name)
319+
public function offsetGet(mixed $name): FormField|array
324320
{
325321
return $this->fields->get($name);
326322
}
@@ -331,12 +327,9 @@ public function offsetGet(mixed $name)
331327
* @param string $name The field name
332328
* @param string|array $value The value of the field
333329
*
334-
* @return void
335-
*
336330
* @throws \InvalidArgumentException if the field does not exist
337331
*/
338-
#[\ReturnTypeWillChange]
339-
public function offsetSet(mixed $name, mixed $value)
332+
public function offsetSet(mixed $name, mixed $value): void
340333
{
341334
$this->fields->set($name, $value);
342335
}
@@ -345,11 +338,8 @@ public function offsetSet(mixed $name, mixed $value)
345338
* Removes a field from the form.
346339
*
347340
* @param string $name The field name
348-
*
349-
* @return void
350341
*/
351-
#[\ReturnTypeWillChange]
352-
public function offsetUnset(mixed $name)
342+
public function offsetUnset(mixed $name): void
353343
{
354344
$this->fields->remove($name);
355345
}

0 commit comments

Comments
 (0)