Replaced references to obfuscate by anonymize

This commit is contained in:
Alejandro Celaya
2020-05-08 15:43:09 +02:00
parent bfdd6e0c50
commit 8f06e4b20f
10 changed files with 26 additions and 46 deletions

View File

@@ -22,16 +22,16 @@ class VisitsTracker implements VisitsTrackerInterface
{
private ORM\EntityManagerInterface $em;
private EventDispatcherInterface $eventDispatcher;
private bool $obfuscateRemoteAddr;
private bool $anonymizeRemoteAddr;
public function __construct(
ORM\EntityManagerInterface $em,
EventDispatcherInterface $eventDispatcher,
bool $obfuscateRemoteAddr
bool $anonymizeRemoteAddr
) {
$this->em = $em;
$this->eventDispatcher = $eventDispatcher;
$this->obfuscateRemoteAddr = $obfuscateRemoteAddr;
$this->anonymizeRemoteAddr = $anonymizeRemoteAddr;
}
/**
@@ -39,7 +39,7 @@ class VisitsTracker implements VisitsTrackerInterface
*/
public function track(ShortUrl $shortUrl, Visitor $visitor): void
{
$visit = new Visit($shortUrl, $visitor, $this->obfuscateRemoteAddr);
$visit = new Visit($shortUrl, $visitor, $this->anonymizeRemoteAddr);
$this->em->persist($visit);
$this->em->flush();