Added feedback to ImportedLinksProcessor

This commit is contained in:
Alejandro Celaya
2020-10-24 15:08:34 +02:00
parent ec3e7212b2
commit 2256f6a9e7
5 changed files with 14 additions and 9 deletions

View File

@@ -256,9 +256,9 @@ DQL;
return $qb->getQuery()->getOneOrNullResult();
}
public function importedUrlExists(ImportedShlinkUrl $url, string $source, bool $importShortCodes): bool
public function importedUrlExists(ImportedShlinkUrl $url, bool $importShortCodes): bool
{
$findConditions = ['importSource' => $source];
$findConditions = ['importSource' => $url->source()];
if ($importShortCodes) {
$findConditions['shortCode'] = $url->shortCode();
} else {

View File

@@ -32,5 +32,5 @@ interface ShortUrlRepositoryInterface extends ObjectRepository
public function findOneMatching(string $url, array $tags, ShortUrlMeta $meta): ?ShortUrl;
public function importedUrlExists(ImportedShlinkUrl $url, string $source, bool $importShortCodes): bool;
public function importedUrlExists(ImportedShlinkUrl $url, bool $importShortCodes): bool;
}