Skip to content

Commit 37dea6c

Browse files
committed
Fix return types for PHP 8.1
1 parent 86aa075 commit 37dea6c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Crawler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,7 @@ public function getNode($position)
11491149
/**
11501150
* @return int
11511151
*/
1152+
#[\ReturnTypeWillChange]
11521153
public function count()
11531154
{
11541155
return \count($this->nodes);
@@ -1157,6 +1158,7 @@ public function count()
11571158
/**
11581159
* @return \ArrayIterator|\DOMNode[]
11591160
*/
1161+
#[\ReturnTypeWillChange]
11601162
public function getIterator()
11611163
{
11621164
return new \ArrayIterator($this->nodes);

Form.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ public function all()
321321
*
322322
* @return bool true if the field exists, false otherwise
323323
*/
324+
#[\ReturnTypeWillChange]
324325
public function offsetExists($name)
325326
{
326327
return $this->has($name);
@@ -335,6 +336,7 @@ public function offsetExists($name)
335336
*
336337
* @throws \InvalidArgumentException if the field does not exist
337338
*/
339+
#[\ReturnTypeWillChange]
338340
public function offsetGet($name)
339341
{
340342
return $this->fields->get($name);
@@ -350,6 +352,7 @@ public function offsetGet($name)
350352
*
351353
* @throws \InvalidArgumentException if the field does not exist
352354
*/
355+
#[\ReturnTypeWillChange]
353356
public function offsetSet($name, $value)
354357
{
355358
$this->fields->set($name, $value);
@@ -362,6 +365,7 @@ public function offsetSet($name, $value)
362365
*
363366
* @return void
364367
*/
368+
#[\ReturnTypeWillChange]
365369
public function offsetUnset($name)
366370
{
367371
$this->fields->remove($name);

0 commit comments

Comments
 (0)