| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function checkForDuplicates(array $existingVehicleInspection, VehicleInspection $newVehicleInspection) |
||
| 22 | { |
||
| 23 | /** @var VehicleInspection $vehicleInspection */ |
||
| 24 | foreach ($existingVehicleInspection as $vehicleInspection) { |
||
| 25 | if ($newVehicleInspection->getLastInspection() === $vehicleInspection->getLastInspection() || |
||
| 26 | $newVehicleInspection->getId() === $vehicleInspection->getId() |
||
| 27 | ) { |
||
| 28 | return true; |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | return false; |
||
| 33 | } |
||
| 34 | } |
||
| 35 |