| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function testAddingIssue() |
||
| 14 | { |
||
| 15 | $collector = new IssuesCollector(); |
||
| 16 | |||
| 17 | $this->assertNull($collector->addIssue(100, 'Test issue', __FILE__, 26)); |
||
| 18 | $this->assertCount(1, $collector->getIssues()); |
||
| 19 | $this->assertSame( |
||
| 20 | [['type' => 100, 'message' => 'Test issue', 'file' => __FILE__, 'line' => 26]], |
||
| 21 | $collector->getIssues() |
||
| 22 | ); |
||
| 23 | } |
||
| 24 | } |
||
| 25 |
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: