mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 17:23:12 +08:00
Fix ImportedLinksProcessorTest
This commit is contained in:
@@ -14,6 +14,7 @@ use Shlinkio\Shlink\Core\Visit\Entity\Visit;
|
||||
use Shlinkio\Shlink\Importer\Model\ImportedShlinkRedirectRule;
|
||||
use Shlinkio\Shlink\Importer\Model\ImportedShlinkVisit;
|
||||
|
||||
use function count;
|
||||
use function Shlinkio\Shlink\Core\ArrayUtils\map;
|
||||
use function Shlinkio\Shlink\Core\normalizeDate;
|
||||
use function sprintf;
|
||||
@@ -69,6 +70,10 @@ final readonly class ShortUrlImporting
|
||||
EntityManagerInterface $em,
|
||||
ShortUrlRedirectRuleServiceInterface $redirectRuleService,
|
||||
): void {
|
||||
if ($this->isNew && count($rules) === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$shortUrl = $this->resolveShortUrl($em);
|
||||
$redirectRules = map(
|
||||
$rules,
|
||||
|
||||
@@ -24,7 +24,7 @@ use function trim;
|
||||
class RedirectCondition extends AbstractEntity implements JsonSerializable
|
||||
{
|
||||
private function __construct(
|
||||
private readonly RedirectConditionType $type,
|
||||
public readonly RedirectConditionType $type,
|
||||
private readonly string $matchValue,
|
||||
private readonly string|null $matchKey = null,
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user