|
@@ 191-202 (lines=12) @@
|
| 188 |
|
$this->addresses[$addressTranslated->getLanguage()->getCode()] = $addressTranslated->getAddress(); |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
public function markAsDuplicateOf(string $placeIdOfCanonical): void |
| 192 |
|
{ |
| 193 |
|
if ($this->isDeleted) { |
| 194 |
|
throw CannotMarkPlaceAsDuplicate::becauseItIsDeleted($this->placeId); |
| 195 |
|
} |
| 196 |
|
|
| 197 |
|
if ($this->isDuplicate) { |
| 198 |
|
throw CannotMarkPlaceAsDuplicate::becauseItIsAlreadyADuplicate($this->placeId); |
| 199 |
|
} |
| 200 |
|
|
| 201 |
|
$this->apply(new MarkedAsDuplicate($this->placeId, $placeIdOfCanonical)); |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
public function markAsCanonicalFor(string $placeIdOfDuplicate): void |
| 205 |
|
{ |
|
@@ 204-215 (lines=12) @@
|
| 201 |
|
$this->apply(new MarkedAsDuplicate($this->placeId, $placeIdOfCanonical)); |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
public function markAsCanonicalFor(string $placeIdOfDuplicate): void |
| 205 |
|
{ |
| 206 |
|
if ($this->isDeleted) { |
| 207 |
|
throw CannotMarkPlaceAsCanonical::becauseItIsDeleted($this->placeId); |
| 208 |
|
} |
| 209 |
|
|
| 210 |
|
if ($this->isDuplicate) { |
| 211 |
|
throw CannotMarkPlaceAsCanonical::becauseItIsAlreadyADuplicate($this->placeId); |
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
$this->apply(new MarkedAsCanonical($this->placeId, $placeIdOfDuplicate)); |
| 215 |
|
} |
| 216 |
|
|
| 217 |
|
private function allowAddressUpdate(Address $address, Language $language): bool |
| 218 |
|
{ |