Rename NewsletterWooCommerceRevenue

[MAILPOET-3069]
This commit is contained in:
Pavel Dohnal
2020-08-10 10:42:35 +02:00
committed by Veljko V
parent 9593918a2c
commit 24c5ff8cb1
3 changed files with 4 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ class NewsletterStatistics {
/** @var int */ /** @var int */
private $totalSentCount; private $totalSentCount;
/** @var NewsletterWooCommerceRevenue|null */ /** @var WooCommerceRevenue|null */
private $wooCommerceRevenue; private $wooCommerceRevenue;
public function __construct($clickCount, $openCount, $unsubscribeCount, $totalSentCount, $wooCommerceRevenue) { public function __construct($clickCount, $openCount, $unsubscribeCount, $totalSentCount, $wooCommerceRevenue) {
@@ -56,7 +56,7 @@ class NewsletterStatistics {
} }
/** /**
* @return NewsletterWooCommerceRevenue|null * @return WooCommerceRevenue|null
*/ */
public function getWooCommerceRevenue() { public function getWooCommerceRevenue() {
return $this->wooCommerceRevenue; return $this->wooCommerceRevenue;

View File

@@ -167,7 +167,7 @@ class NewsletterStatisticsRepository extends Repository {
$revenues = []; $revenues = [];
foreach ($results ?: [] as $result) { foreach ($results ?: [] as $result) {
$revenues[(int)$result['id']] = new NewsletterWooCommerceRevenue( $revenues[(int)$result['id']] = new WooCommerceRevenue(
$currency, $currency,
(float)$result['total'], (float)$result['total'],
(int)$result['cnt'], (int)$result['cnt'],

View File

@@ -4,7 +4,7 @@ namespace MailPoet\Newsletter\Statistics;
use MailPoet\WooCommerce\Helper; use MailPoet\WooCommerce\Helper;
class NewsletterWooCommerceRevenue { class WooCommerceRevenue {
/** @var string */ /** @var string */
private $currency; private $currency;