| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 45 | public function canTakeAway(?Purchase $bringAlong): bool |
||
| 46 | { |
||
| 47 | $remaining = array_diff($this->purchases, [$bringAlong]); |
||
| 48 | foreach ($remaining as $theOne) { |
||
| 49 | foreach ($remaining as $theOther) { |
||
| 50 | if ($theOne->eats($theOther)) { |
||
| 51 | return false; |
||
| 52 | } |
||
| 53 | } |
||
| 54 | } |
||
| 55 | return true; |
||
| 56 | } |
||
| 89 |