Skip to content

Commit d34bfff

Browse files
authored
Fix warnings on running the test suite (#238)
* update amphp packages * add missing types to `TestArrayAccessImplementation` class in test files
1 parent 88435b5 commit d34bfff

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"illuminate/support": "^8.71|^9.0"
2727
},
2828
"require-dev": {
29-
"amphp/parallel": "^0.2.5",
30-
"amphp/parallel-functions": "^0.1.3",
29+
"amphp/parallel": "^1.4.1",
30+
"amphp/parallel-functions": "^1.1.0",
3131
"mockery/mockery": "^1.4.2",
3232
"orchestra/testbench": "^6.23|^7.0",
3333
"phpunit/phpunit": "^9.4.4",
@@ -63,4 +63,4 @@
6363
},
6464
"minimum-stability": "dev",
6565
"prefer-stable": true
66-
}
66+
}

tests/Macros/PluckManyTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public function it_can_pluck_from_array_and_object_items()
3535

3636
$this->assertEquals(
3737
[
38-
(object) ['name' => 'matt', 'hobby' => 'coding'],
39-
['name' => 'tomo', 'hobby' => 'cooking'],
40-
],
38+
(object) ['name' => 'matt', 'hobby' => 'coding'],
39+
['name' => 'tomo', 'hobby' => 'cooking'],
40+
],
4141
$data->pluckMany(['name', 'hobby'])->all()
4242
);
4343
}
@@ -52,9 +52,9 @@ public function it_can_pluck_from_objects_that_implement_array_access_interface(
5252

5353
$this->assertEquals(
5454
[
55-
['name' => 'marco', 'hobby' => 'drinking'],
56-
['name' => 'belle', 'hobby' => 'cross-stitch'],
57-
],
55+
['name' => 'marco', 'hobby' => 'drinking'],
56+
['name' => 'belle', 'hobby' => 'cross-stitch'],
57+
],
5858
$data->pluckMany(['name', 'hobby'])->all()
5959
);
6060
}
@@ -69,22 +69,22 @@ public function __construct($arr)
6969
$this->arr = $arr;
7070
}
7171

72-
public function offsetExists($offset)
72+
public function offsetExists($offset): bool
7373
{
7474
return isset($this->arr[$offset]);
7575
}
7676

77-
public function offsetGet($offset)
77+
public function offsetGet($offset): mixed
7878
{
7979
return $this->arr[$offset];
8080
}
8181

82-
public function offsetSet($offset, $value)
82+
public function offsetSet($offset, $value): void
8383
{
8484
$this->arr[$offset] = $value;
8585
}
8686

87-
public function offsetUnset($offset)
87+
public function offsetUnset($offset): void
8888
{
8989
unset($this->arr[$offset]);
9090
}

0 commit comments

Comments
 (0)