| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function testFormat() |
||
| 29 | { |
||
| 30 | $formatDotNet = 'i am dot net format'; |
||
| 31 | $formatPhp = 'i am php format'; |
||
| 32 | |||
| 33 | $this->dotnetDateTime |
||
| 34 | ->shouldReceive('formatToPhp') |
||
| 35 | ->with($formatDotNet) |
||
| 36 | ->andReturn($formatPhp) |
||
| 37 | ->once() |
||
| 38 | ->getMock(); |
||
| 39 | |||
| 40 | $formatted = 'i am formatted'; |
||
| 41 | $dateTime = m::mock(DateTime::class) |
||
| 42 | ->shouldReceive('format') |
||
| 43 | ->with($formatPhp) |
||
| 44 | ->andReturn($formatted) |
||
| 45 | ->once() |
||
| 46 | ->getMock(); |
||
| 47 | |||
| 48 | $actual = $this->formatter->format($dateTime, $formatDotNet); |
||
| 49 | |||
| 50 | $this->assertEquals($formatted, $actual); |
||
| 51 | } |
||
| 53 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..