| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function log(Enrollment $fromEnrollment, Enrollment $toEnrollment) |
||
| 15 | { |
||
| 16 | $logExchange = LogExchange::make(); |
||
| 17 | $logExchange->fromShift()->associate($fromEnrollment->shift); |
||
| 18 | $logExchange->toShift()->associate($toEnrollment->shift); |
||
| 19 | $logExchange->fromStudent()->associate($fromEnrollment->student); |
||
| 20 | $logExchange->toStudent()->associate($toEnrollment->student); |
||
| 21 | $logExchange->save(); |
||
| 22 | } |
||
| 32 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: