From 24c5ff8cb13baf741daafff52eed9f8ba535aa7b Mon Sep 17 00:00:00 2001 From: Pavel Dohnal Date: Mon, 10 Aug 2020 10:42:35 +0200 Subject: [PATCH] Rename NewsletterWooCommerceRevenue [MAILPOET-3069] --- lib/Newsletter/Statistics/NewsletterStatistics.php | 4 ++-- lib/Newsletter/Statistics/NewsletterStatisticsRepository.php | 2 +- ...ewsletterWooCommerceRevenue.php => WooCommerceRevenue.php} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename lib/Newsletter/Statistics/{NewsletterWooCommerceRevenue.php => WooCommerceRevenue.php} (97%) diff --git a/lib/Newsletter/Statistics/NewsletterStatistics.php b/lib/Newsletter/Statistics/NewsletterStatistics.php index 8b2d00ebed..4d364226e4 100644 --- a/lib/Newsletter/Statistics/NewsletterStatistics.php +++ b/lib/Newsletter/Statistics/NewsletterStatistics.php @@ -16,7 +16,7 @@ class NewsletterStatistics { /** @var int */ private $totalSentCount; - /** @var NewsletterWooCommerceRevenue|null */ + /** @var WooCommerceRevenue|null */ private $wooCommerceRevenue; public function __construct($clickCount, $openCount, $unsubscribeCount, $totalSentCount, $wooCommerceRevenue) { @@ -56,7 +56,7 @@ class NewsletterStatistics { } /** - * @return NewsletterWooCommerceRevenue|null + * @return WooCommerceRevenue|null */ public function getWooCommerceRevenue() { return $this->wooCommerceRevenue; diff --git a/lib/Newsletter/Statistics/NewsletterStatisticsRepository.php b/lib/Newsletter/Statistics/NewsletterStatisticsRepository.php index 26157503ba..4cc4f6fd2a 100644 --- a/lib/Newsletter/Statistics/NewsletterStatisticsRepository.php +++ b/lib/Newsletter/Statistics/NewsletterStatisticsRepository.php @@ -167,7 +167,7 @@ class NewsletterStatisticsRepository extends Repository { $revenues = []; foreach ($results ?: [] as $result) { - $revenues[(int)$result['id']] = new NewsletterWooCommerceRevenue( + $revenues[(int)$result['id']] = new WooCommerceRevenue( $currency, (float)$result['total'], (int)$result['cnt'], diff --git a/lib/Newsletter/Statistics/NewsletterWooCommerceRevenue.php b/lib/Newsletter/Statistics/WooCommerceRevenue.php similarity index 97% rename from lib/Newsletter/Statistics/NewsletterWooCommerceRevenue.php rename to lib/Newsletter/Statistics/WooCommerceRevenue.php index 074883c5cb..4792c73f9f 100644 --- a/lib/Newsletter/Statistics/NewsletterWooCommerceRevenue.php +++ b/lib/Newsletter/Statistics/WooCommerceRevenue.php @@ -4,7 +4,7 @@ namespace MailPoet\Newsletter\Statistics; use MailPoet\WooCommerce\Helper; -class NewsletterWooCommerceRevenue { +class WooCommerceRevenue { /** @var string */ private $currency;