@@ 65-72 (lines=8) @@ | ||
62 | Location $location, |
|
63 | ContactInformation $contactInformation |
|
64 | ) { |
|
65 | if ($this->raLocations->hasWith($raLocationId)) { |
|
66 | throw new DomainException(sprintf( |
|
67 | 'Cannot add RaLocation with RaLocationId "%s" to RaLocations of InstitutionConfiguration "%s":' |
|
68 | . 'it is already present', |
|
69 | $raLocationId, |
|
70 | $this->getAggregateRootId() |
|
71 | )); |
|
72 | } |
|
73 | ||
74 | // apply ra location added event |
|
75 | } |
|
@@ 83-90 (lines=8) @@ | ||
80 | Location $location, |
|
81 | ContactInformation $contactInformation |
|
82 | ) { |
|
83 | if (!$this->raLocations->hasWith($raLocationId)) { |
|
84 | throw new DomainException(sprintf( |
|
85 | 'Cannot change RaLocation with RaLocationId "%s" in RaLocations of InstitutionConfiguration "%s":' |
|
86 | . 'it is not present', |
|
87 | $raLocationId, |
|
88 | $this->getAggregateRootId() |
|
89 | )); |
|
90 | } |
|
91 | ||
92 | $raLocation = $this->raLocations->getBy($raLocationId); |
|
93 | ||
@@ 107-114 (lines=8) @@ | ||
104 | ||
105 | public function removeRaLocation(RaLocationId $raLocationId) |
|
106 | { |
|
107 | if (!$this->raLocations->hasWith($raLocationId)) { |
|
108 | throw new DomainException(sprintf( |
|
109 | 'Cannot remove RaLocation with RaLocationId "%s" in RaLocations of InstitutionConfiguration "%s":' |
|
110 | . 'it is not present', |
|
111 | $raLocationId, |
|
112 | $this->getAggregateRootId() |
|
113 | )); |
|
114 | } |
|
115 | ||
116 | // apply ra location removed event |
|
117 | } |