Skip to content

Commit

Permalink
Fix warnings on running the test suite (#238)
Browse files Browse the repository at this point in the history
* update amphp packages

* add missing types to `TestArrayAccessImplementation` class in test files
  • Loading branch information
alexmanase authored Nov 10, 2022
1 parent 88435b5 commit d34bfff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"illuminate/support": "^8.71|^9.0"
},
"require-dev": {
"amphp/parallel": "^0.2.5",
"amphp/parallel-functions": "^0.1.3",
"amphp/parallel": "^1.4.1",
"amphp/parallel-functions": "^1.1.0",
"mockery/mockery": "^1.4.2",
"orchestra/testbench": "^6.23|^7.0",
"phpunit/phpunit": "^9.4.4",
Expand Down Expand Up @@ -63,4 +63,4 @@
},
"minimum-stability": "dev",
"prefer-stable": true
}
}
20 changes: 10 additions & 10 deletions tests/Macros/PluckManyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public function it_can_pluck_from_array_and_object_items()

$this->assertEquals(
[
(object) ['name' => 'matt', 'hobby' => 'coding'],
['name' => 'tomo', 'hobby' => 'cooking'],
],
(object) ['name' => 'matt', 'hobby' => 'coding'],
['name' => 'tomo', 'hobby' => 'cooking'],
],
$data->pluckMany(['name', 'hobby'])->all()
);
}
Expand All @@ -52,9 +52,9 @@ public function it_can_pluck_from_objects_that_implement_array_access_interface(

$this->assertEquals(
[
['name' => 'marco', 'hobby' => 'drinking'],
['name' => 'belle', 'hobby' => 'cross-stitch'],
],
['name' => 'marco', 'hobby' => 'drinking'],
['name' => 'belle', 'hobby' => 'cross-stitch'],
],
$data->pluckMany(['name', 'hobby'])->all()
);
}
Expand All @@ -69,22 +69,22 @@ public function __construct($arr)
$this->arr = $arr;
}

public function offsetExists($offset)
public function offsetExists($offset): bool
{
return isset($this->arr[$offset]);
}

public function offsetGet($offset)
public function offsetGet($offset): mixed
{
return $this->arr[$offset];
}

public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
$this->arr[$offset] = $value;
}

public function offsetUnset($offset)
public function offsetUnset($offset): void
{
unset($this->arr[$offset]);
}
Expand Down

0 comments on commit d34bfff

Please sign in to comment.