@@ -17,13 +17,13 @@ class ArrayReaderTest extends TestCase
17
17
* @dataProvider providerGetInt
18
18
*
19
19
* @param mixed $data The data
20
- * @param string $key The lookup key
20
+ * @param string|int $key The lookup key
21
21
* @param mixed $default The default value
22
22
* @param mixed $expected The expected value
23
23
*
24
24
* @return void
25
25
*/
26
- public function testCreateFromArray ($ data , string $ key , $ default , $ expected )
26
+ public function testCreateFromArray ($ data , $ key , $ default , $ expected ): void
27
27
{
28
28
$ reader = ArrayReader::createFromArray ($ data );
29
29
static ::assertSame ($ expected , $ reader ->getInt ($ key , $ default ));
@@ -35,13 +35,13 @@ public function testCreateFromArray($data, string $key, $default, $expected)
35
35
* @dataProvider providerGetInt
36
36
*
37
37
* @param mixed $data The data
38
- * @param string $key The lookup key
38
+ * @param string|key $key The lookup key
39
39
* @param mixed $default The default value
40
40
* @param mixed $expected The expected value
41
41
*
42
42
* @return void
43
43
*/
44
- public function testGetInt ($ data , string $ key , $ default , $ expected )
44
+ public function testGetInt ($ data , $ key , $ default , $ expected ): void
45
45
{
46
46
$ reader = new ArrayReader ($ data );
47
47
static ::assertSame ($ expected , $ reader ->getInt ($ key , $ default ));
@@ -53,12 +53,12 @@ public function testGetInt($data, string $key, $default, $expected)
53
53
* @dataProvider providerGetIntError
54
54
*
55
55
* @param mixed $data The data
56
- * @param string $key The lookup key
56
+ * @param string|int $key The lookup key
57
57
* @param mixed $default The default value
58
58
*
59
59
* @return void
60
60
*/
61
- public function testGetIntError ($ data , string $ key , $ default )
61
+ public function testGetIntError ($ data , $ key , $ default ): void
62
62
{
63
63
$ reader = new ArrayReader ($ data );
64
64
@@ -73,13 +73,13 @@ public function testGetIntError($data, string $key, $default)
73
73
* @dataProvider providerFindInt
74
74
*
75
75
* @param mixed $data The data
76
- * @param string $key The lookup key
76
+ * @param string|int $key The lookup key
77
77
* @param mixed $default The default value
78
78
* @param mixed $expected The expected value
79
79
*
80
80
* @return void
81
81
*/
82
- public function testFindInt ($ data , string $ key , $ default , $ expected )
82
+ public function testFindInt ($ data , $ key , $ default , $ expected ): void
83
83
{
84
84
$ reader = new ArrayReader ($ data );
85
85
static ::assertSame ($ expected , $ reader ->findInt ($ key , $ default ));
@@ -144,7 +144,7 @@ public function providerFindInt(): array
144
144
*
145
145
* @return void
146
146
*/
147
- public function testGetString ($ data , string $ key , $ default , $ expected )
147
+ public function testGetString ($ data , string $ key , $ default , $ expected ): void
148
148
{
149
149
$ reader = new ArrayReader ($ data );
150
150
static ::assertSame ($ expected , $ reader ->findString ($ key , $ default ));
@@ -177,7 +177,7 @@ public function providerGetString(): array
177
177
*
178
178
* @return void
179
179
*/
180
- public function testGetStringError ($ data , string $ key )
180
+ public function testGetStringError ($ data , string $ key ): void
181
181
{
182
182
$ this ->expectException (InvalidArgumentException::class);
183
183
@@ -214,7 +214,7 @@ public function providerGetStringError(): array
214
214
*
215
215
* @return void
216
216
*/
217
- public function testFindString ($ data , string $ key , $ default , $ expected )
217
+ public function testFindString ($ data , string $ key , $ default , $ expected ): void
218
218
{
219
219
$ reader = new ArrayReader ($ data );
220
220
static ::assertSame ($ expected , $ reader ->findString ($ key , $ default ));
@@ -243,13 +243,13 @@ public function providerFindString(): array
243
243
* @dataProvider providerGetArray
244
244
*
245
245
* @param mixed $data The data
246
- * @param string $key The lookup key
246
+ * @param string|int $key The lookup key
247
247
* @param mixed $default The default value
248
248
* @param mixed $expected The expected value
249
249
*
250
250
* @return void
251
251
*/
252
- public function testGetArray ($ data , string $ key , $ default , $ expected )
252
+ public function testGetArray ($ data , $ key , $ default , $ expected ): void
253
253
{
254
254
$ reader = new ArrayReader ($ data );
255
255
static ::assertSame ($ expected , $ reader ->getArray ($ key , $ default ));
@@ -276,12 +276,12 @@ public function providerGetArray(): array
276
276
* @dataProvider providerGetArrayError
277
277
*
278
278
* @param mixed $data The data
279
- * @param string $key The lookup key
279
+ * @param string|int $key The lookup key
280
280
* @param mixed $default The default value
281
281
*
282
282
* @return void
283
283
*/
284
- public function testGetArrayError ($ data , string $ key , $ default )
284
+ public function testGetArrayError ($ data , $ key , $ default ): void
285
285
{
286
286
$ reader = new ArrayReader ($ data );
287
287
@@ -309,13 +309,13 @@ public function providerGetArrayError(): array
309
309
* @dataProvider providerFindArray
310
310
*
311
311
* @param mixed $data The data
312
- * @param string $key The lookup key
312
+ * @param string|int $key The lookup key
313
313
* @param mixed $default The default value
314
314
* @param mixed $expected The expected value
315
315
*
316
316
* @return void
317
317
*/
318
- public function testFindArray ($ data , string $ key , $ default , $ expected )
318
+ public function testFindArray ($ data , $ key , $ default , $ expected ): void
319
319
{
320
320
$ reader = new ArrayReader ($ data );
321
321
static ::assertSame ($ expected , $ reader ->findArray ($ key , $ default ));
0 commit comments