| 1 | <?php |
||
| 11 | class DeleteShortUrlService implements DeleteShortUrlServiceInterface |
||
| 12 | { |
||
| 13 | use FindShortCodeTrait; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var EntityManagerInterface |
||
| 17 | */ |
||
| 18 | private $em; |
||
| 19 | /** |
||
| 20 | * @var DeleteShortUrlsOptions |
||
| 21 | */ |
||
| 22 | private $deleteShortUrlsOptions; |
||
| 23 | |||
| 24 | 3 | public function __construct(EntityManagerInterface $em, DeleteShortUrlsOptions $deleteShortUrlsOptions) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @throws Exception\InvalidShortCodeException |
||
| 32 | * @throws Exception\DeleteShortUrlException |
||
| 33 | */ |
||
| 34 | 3 | public function deleteByShortCode(string $shortCode): void |
|
| 47 | |||
| 48 | 3 | private function isThresholdReached(ShortUrl $shortUrl): bool |
|
| 56 | } |
||
| 57 |