| @@ 88-93 (lines=6) @@ | ||
| 85 | ||
| 86 | private function replaceEntity(HasId $entity, $key) |
|
| 87 | { |
|
| 88 | if (isset($this->pool[$key])) { |
|
| 89 | $id = $this->pool[$key]->getId(); |
|
| 90 | ||
| 91 | unset($this->indexed[$id]); |
|
| 92 | unset($this->map[$id]); |
|
| 93 | } |
|
| 94 | ||
| 95 | $id = $entity->getId(); |
|
| 96 | ||
| @@ 150-154 (lines=5) @@ | ||
| 147 | { |
|
| 148 | $key = $entity->getId(); |
|
| 149 | ||
| 150 | if ($key !== null) { |
|
| 151 | unset($this->indexed[$key]); |
|
| 152 | unset($this->pool[$this->map[$key]]); |
|
| 153 | unset($this->map[$key]); |
|
| 154 | } |
|
| 155 | } |
|
| 156 | ||
| 157 | ||