| Conditions | 3 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function differenceBetween(Collection ...$others) : Differentiable |
||
| 27 | { |
||
| 28 | return $this->newCopy(array_filter( |
||
|
|
|||
| 29 | $this->items(), |
||
| 30 | function ($item) use ($others) : bool |
||
| 31 | { |
||
| 32 | foreach ($others as $otherCollection) { |
||
| 33 | if (in_array($item, $otherCollection->items())) { |
||
| 34 | return false; |
||
| 35 | } |
||
| 36 | } |
||
| 37 | return true; |
||
| 38 | } |
||
| 51 | } |