@@ 36-44 (lines=9) @@ | ||
33 | { |
|
34 | $iterator = $collection->iterator(); |
|
35 | ||
36 | while($iterator->hasNext()) |
|
37 | { |
|
38 | $element = $iterator->next(); |
|
39 | if($this->contains($element)) |
|
40 | { |
|
41 | $this->remove($element); |
|
42 | $changed = true; |
|
43 | } |
|
44 | } |
|
45 | } |
|
46 | else |
|
47 | { |
|
@@ 50-58 (lines=9) @@ | ||
47 | { |
|
48 | $iterator = $this->iterator(); |
|
49 | ||
50 | while($iterator->hasNext()) |
|
51 | { |
|
52 | $element = $iterator->next(); |
|
53 | if($collection->contains($element)) |
|
54 | { |
|
55 | $iterator->remove(); |
|
56 | $changed = true; |
|
57 | } |
|
58 | } |
|
59 | } |
|
60 | ||
61 | return $changed; |