Skip to content

Commit e316995

Browse files
committed
Add PHP 8 support
1 parent 1d1c98a commit e316995

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

tests/ArrayReaderTest.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ class ArrayReaderTest extends TestCase
1717
* @dataProvider providerGetInt
1818
*
1919
* @param mixed $data The data
20-
* @param string $key The lookup key
20+
* @param string|int $key The lookup key
2121
* @param mixed $default The default value
2222
* @param mixed $expected The expected value
2323
*
2424
* @return void
2525
*/
26-
public function testCreateFromArray($data, string $key, $default, $expected)
26+
public function testCreateFromArray($data, $key, $default, $expected): void
2727
{
2828
$reader = ArrayReader::createFromArray($data);
2929
static::assertSame($expected, $reader->getInt($key, $default));
@@ -35,13 +35,13 @@ public function testCreateFromArray($data, string $key, $default, $expected)
3535
* @dataProvider providerGetInt
3636
*
3737
* @param mixed $data The data
38-
* @param string $key The lookup key
38+
* @param string|key $key The lookup key
3939
* @param mixed $default The default value
4040
* @param mixed $expected The expected value
4141
*
4242
* @return void
4343
*/
44-
public function testGetInt($data, string $key, $default, $expected)
44+
public function testGetInt($data, $key, $default, $expected): void
4545
{
4646
$reader = new ArrayReader($data);
4747
static::assertSame($expected, $reader->getInt($key, $default));
@@ -53,12 +53,12 @@ public function testGetInt($data, string $key, $default, $expected)
5353
* @dataProvider providerGetIntError
5454
*
5555
* @param mixed $data The data
56-
* @param string $key The lookup key
56+
* @param string|int $key The lookup key
5757
* @param mixed $default The default value
5858
*
5959
* @return void
6060
*/
61-
public function testGetIntError($data, string $key, $default)
61+
public function testGetIntError($data, $key, $default): void
6262
{
6363
$reader = new ArrayReader($data);
6464

@@ -73,13 +73,13 @@ public function testGetIntError($data, string $key, $default)
7373
* @dataProvider providerFindInt
7474
*
7575
* @param mixed $data The data
76-
* @param string $key The lookup key
76+
* @param string|int $key The lookup key
7777
* @param mixed $default The default value
7878
* @param mixed $expected The expected value
7979
*
8080
* @return void
8181
*/
82-
public function testFindInt($data, string $key, $default, $expected)
82+
public function testFindInt($data, $key, $default, $expected): void
8383
{
8484
$reader = new ArrayReader($data);
8585
static::assertSame($expected, $reader->findInt($key, $default));
@@ -144,7 +144,7 @@ public function providerFindInt(): array
144144
*
145145
* @return void
146146
*/
147-
public function testGetString($data, string $key, $default, $expected)
147+
public function testGetString($data, string $key, $default, $expected): void
148148
{
149149
$reader = new ArrayReader($data);
150150
static::assertSame($expected, $reader->findString($key, $default));
@@ -177,7 +177,7 @@ public function providerGetString(): array
177177
*
178178
* @return void
179179
*/
180-
public function testGetStringError($data, string $key)
180+
public function testGetStringError($data, string $key): void
181181
{
182182
$this->expectException(InvalidArgumentException::class);
183183

@@ -214,7 +214,7 @@ public function providerGetStringError(): array
214214
*
215215
* @return void
216216
*/
217-
public function testFindString($data, string $key, $default, $expected)
217+
public function testFindString($data, string $key, $default, $expected): void
218218
{
219219
$reader = new ArrayReader($data);
220220
static::assertSame($expected, $reader->findString($key, $default));
@@ -243,13 +243,13 @@ public function providerFindString(): array
243243
* @dataProvider providerGetArray
244244
*
245245
* @param mixed $data The data
246-
* @param string $key The lookup key
246+
* @param string|int $key The lookup key
247247
* @param mixed $default The default value
248248
* @param mixed $expected The expected value
249249
*
250250
* @return void
251251
*/
252-
public function testGetArray($data, string $key, $default, $expected)
252+
public function testGetArray($data, $key, $default, $expected): void
253253
{
254254
$reader = new ArrayReader($data);
255255
static::assertSame($expected, $reader->getArray($key, $default));
@@ -276,12 +276,12 @@ public function providerGetArray(): array
276276
* @dataProvider providerGetArrayError
277277
*
278278
* @param mixed $data The data
279-
* @param string $key The lookup key
279+
* @param string|int $key The lookup key
280280
* @param mixed $default The default value
281281
*
282282
* @return void
283283
*/
284-
public function testGetArrayError($data, string $key, $default)
284+
public function testGetArrayError($data, $key, $default): void
285285
{
286286
$reader = new ArrayReader($data);
287287

@@ -309,13 +309,13 @@ public function providerGetArrayError(): array
309309
* @dataProvider providerFindArray
310310
*
311311
* @param mixed $data The data
312-
* @param string $key The lookup key
312+
* @param string|int $key The lookup key
313313
* @param mixed $default The default value
314314
* @param mixed $expected The expected value
315315
*
316316
* @return void
317317
*/
318-
public function testFindArray($data, string $key, $default, $expected)
318+
public function testFindArray($data, $key, $default, $expected): void
319319
{
320320
$reader = new ArrayReader($data);
321321
static::assertSame($expected, $reader->findArray($key, $default));

0 commit comments

Comments
 (0)