| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function willHandlePlaceRobot() |
||
| 23 | { |
||
| 24 | $table = Table::create(10); |
||
| 25 | $mockRepo = self::createMock(RobotRepositoryInterface::class); |
||
| 26 | $robotPlacer = new RobotPlacer($table, $mockRepo); |
||
|
|
|||
| 27 | |||
| 28 | self::assertInstanceOf(RobotPlacer::class, $robotPlacer); |
||
| 29 | |||
| 30 | $command = new PlaceRobot([0, 1], 'N'); |
||
| 31 | |||
| 32 | $mockRepo->expects($this->once())->method('save'); |
||
| 33 | |||
| 34 | $robotPlacer->handlePlaceRobot($command); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |
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: