From ee9f886ce2d93949b79a5a835c51c6e5fa778e0d Mon Sep 17 00:00:00 2001 From: Pavel Dohnal Date: Wed, 30 Oct 2019 12:56:15 +0100 Subject: [PATCH] Simplify method [MAILPOET-2439] --- lib/Entities/NewsletterLinkEntity.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Entities/NewsletterLinkEntity.php b/lib/Entities/NewsletterLinkEntity.php index 42cafcf19b..e6ff1a71ae 100644 --- a/lib/Entities/NewsletterLinkEntity.php +++ b/lib/Entities/NewsletterLinkEntity.php @@ -91,8 +91,6 @@ class NewsletterLinkEntity { * @return int */ function getTotalClicksCount() { - $criteria = Criteria::create() - ->where(Criteria::expr()->eq("link", $this)); - return $this->clicks->matching($criteria)->count(); + return $this->clicks->count(); } }