| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 36 | public function diff(EntityListInterface $list): self |
||
| 37 | { |
||
| 38 | $differingEntities = []; |
||
| 39 | foreach ($this as $pos => $entity) { |
||
| 40 | /** |
||
| 41 | * @psalm-suppress PossiblyNullArgument |
||
| 42 | * @psalm-suppress ArgumentTypeCoercion |
||
| 43 | */ |
||
| 44 | if (!$list->has($pos) || !(new EntityDiff)($entity, $list->get($pos))->isEmpty()) { |
||
| 45 | $differingEntities[] = $entity; |
||
| 46 | } |
||
| 47 | } |
||
| 48 | return new static($differingEntities); |
||
| 49 | } |
||
| 51 |