Update RequestTracker so that its methods return the new Visit instance, if any

This commit is contained in:
Alejandro Celaya
2024-11-11 08:58:16 +01:00
parent a5a98bd578
commit 48ecef3436
2 changed files with 16 additions and 12 deletions

View File

@@ -6,10 +6,11 @@ namespace Shlinkio\Shlink\Core\Visit;
use Psr\Http\Message\ServerRequestInterface;
use Shlinkio\Shlink\Core\ShortUrl\Entity\ShortUrl;
use Shlinkio\Shlink\Core\Visit\Entity\Visit;
interface RequestTrackerInterface
{
public function trackIfApplicable(ShortUrl $shortUrl, ServerRequestInterface $request): void;
public function trackIfApplicable(ShortUrl $shortUrl, ServerRequestInterface $request): Visit|null;
public function trackNotFoundIfApplicable(ServerRequestInterface $request): void;
public function trackNotFoundIfApplicable(ServerRequestInterface $request): Visit|null;
}