|
2 | 2 | declare(strict_types=1); |
3 | 3 | namespace ParagonIE\Chronicle\Handlers; |
4 | 4 |
|
5 | | -use ParagonIE\Chronicle\{ |
6 | | - Chronicle, |
| 5 | +use ParagonIE\Chronicle\{Chronicle, |
7 | 6 | Exception\FilesystemException, |
| 7 | + Exception\InvalidInstanceException, |
8 | 8 | Exception\ReplicationSourceNotFound, |
9 | 9 | Exception\HashNotFound, |
10 | | - HandlerInterface |
11 | | -}; |
| 10 | + HandlerInterface}; |
12 | 11 | use Psr\Http\Message\{ |
13 | 12 | RequestInterface, |
14 | 13 | ResponseInterface |
@@ -122,6 +121,7 @@ public function exportChain(): ResponseInterface |
122 | 121 | * |
123 | 122 | * @throws HashNotFound |
124 | 123 | * @throws FilesystemException |
| 124 | + * @throws InvalidInstanceException |
125 | 125 | */ |
126 | 126 | public function getByHash(array $args = []): ResponseInterface |
127 | 127 | { |
@@ -169,6 +169,7 @@ public function getByHash(array $args = []): ResponseInterface |
169 | 169 | * @return ResponseInterface |
170 | 170 | * |
171 | 171 | * @throws FilesystemException |
| 172 | + * @throws InvalidInstanceException |
172 | 173 | */ |
173 | 174 | public function getLastHash(): ResponseInterface |
174 | 175 | { |
@@ -210,6 +211,7 @@ public function getLastHash(): ResponseInterface |
210 | 211 | * @return ResponseInterface |
211 | 212 | * |
212 | 213 | * @throws FilesystemException |
| 214 | + * @throws InvalidInstanceException |
213 | 215 | */ |
214 | 216 | protected function getIndex(): ResponseInterface |
215 | 217 | { |
@@ -264,6 +266,7 @@ protected function getIndex(): ResponseInterface |
264 | 266 | * |
265 | 267 | * @throws FilesystemException |
266 | 268 | * @throws HashNotFound |
| 269 | + * @throws InvalidInstanceException |
267 | 270 | */ |
268 | 271 | public function getSince(array $args = []): ResponseInterface |
269 | 272 | { |
@@ -324,6 +327,7 @@ public function getSince(array $args = []): ResponseInterface |
324 | 327 | * Export an entire replicated chain, as-is. |
325 | 328 | * |
326 | 329 | * @return array |
| 330 | + * @throws InvalidInstanceException |
327 | 331 | */ |
328 | 332 | protected function getFullChain(): array |
329 | 333 | { |
@@ -356,6 +360,7 @@ protected function getFullChain(): array |
356 | 360 | * @return self |
357 | 361 | * |
358 | 362 | * @throws ReplicationSourceNotFound |
| 363 | + * @throws InvalidInstanceException |
359 | 364 | */ |
360 | 365 | protected function selectReplication(string $uniqueId): self |
361 | 366 | { |
|
0 commit comments