Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function testdoIterateOnArray() { |
||
37 | |||
38 | $expected = array( |
||
39 | 1 , 42 |
||
40 | ); |
||
41 | |||
42 | $mappingIterator = new MappingIterator( $expected, function( $counter ) { |
||
43 | return $counter; |
||
44 | } ); |
||
45 | |||
46 | foreach ( $mappingIterator as $key => $value ) { |
||
47 | $this->assertEquals( |
||
48 | $expected[$key], |
||
49 | $value |
||
50 | ); |
||
51 | } |
||
52 | } |
||
53 | |||
73 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: