diff --git a/mailpoet/lib/Subscribers/SubscribersEmailCountsController.php b/mailpoet/lib/Subscribers/SubscribersEmailCountsController.php index f897fad5f3..02851c11b9 100644 --- a/mailpoet/lib/Subscribers/SubscribersEmailCountsController.php +++ b/mailpoet/lib/Subscribers/SubscribersEmailCountsController.php @@ -126,6 +126,6 @@ class SubscribersEmailCountsController { $subscribersInRange = $result->fetchAllAssociative(); - return [$subscribersInRange[0]['count'], $subscribersInRange[0]['max']]; + return [(int)$subscribersInRange[0]['count'], (int)$subscribersInRange[0]['max']]; } } diff --git a/mailpoet/tasks/phpstan/phpstan-7-baseline.neon b/mailpoet/tasks/phpstan/phpstan-7-baseline.neon index 7759ca4581..fa8f1a9fd2 100644 --- a/mailpoet/tasks/phpstan/phpstan-7-baseline.neon +++ b/mailpoet/tasks/phpstan/phpstan-7-baseline.neon @@ -1106,6 +1106,11 @@ parameters: count: 2 path: ../../lib/Subscribers/InactiveSubscribersController.php + - + message: "#^Cannot cast mixed to int\\.$#" + count: 2 + path: ../../lib/Subscribers/SubscribersEmailCountsController.php + - message: "#^Cannot cast mixed to int\\.$#" count: 3 diff --git a/mailpoet/tasks/phpstan/phpstan-8-baseline.neon b/mailpoet/tasks/phpstan/phpstan-8-baseline.neon index 0269d5e915..d316fd64b2 100644 --- a/mailpoet/tasks/phpstan/phpstan-8-baseline.neon +++ b/mailpoet/tasks/phpstan/phpstan-8-baseline.neon @@ -1106,6 +1106,11 @@ parameters: count: 2 path: ../../lib/Subscribers/InactiveSubscribersController.php + - + message: "#^Cannot cast mixed to int\\.$#" + count: 2 + path: ../../lib/Subscribers/SubscribersEmailCountsController.php + - message: "#^Cannot cast mixed to int\\.$#" count: 3