diff --git a/ViewModel/Adminhtml/Analytics/Overview.php b/ViewModel/Adminhtml/Analytics/Overview.php
index 0865b4bb1..7ccc91a39 100644
--- a/ViewModel/Adminhtml/Analytics/Overview.php
+++ b/ViewModel/Adminhtml/Analytics/Overview.php
@@ -7,6 +7,7 @@
use Algolia\AlgoliaSearch\ViewModel\Adminhtml\BackendView;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;
+use Magento\Framework\Locale\ResolverInterface;
use Magento\Store\Api\Data\StoreInterface;
class Overview implements \Magento\Framework\View\Element\Block\ArgumentInterface
@@ -17,15 +18,6 @@ class Overview implements \Magento\Framework\View\Element\Block\ArgumentInterfac
public const DEFAULT_RETENTION_DAYS = 90;
- /** @var BackendView */
- private $backendView;
-
- /** @var AnalyticsHelper */
- private $analyticsHelper;
-
- /** @var IndexEntityDataProvider */
- private $indexEntityDataProvider;
-
/** @var array */
private $analyticsParams = [];
@@ -33,6 +25,7 @@ class Overview implements \Magento\Framework\View\Element\Block\ArgumentInterfac
* @param BackendView $backendView
* @param AnalyticsHelper $analyticsHelper
* @param IndexEntityDataProvider $indexEntityDataProvider
+ * @param ResolverInterface $localeResolver
*/
public function __construct(
protected BackendView $backendView,
@@ -49,9 +42,13 @@ public function getBackendView()
return $this->backendView;
}
- public function getTimeZone()
+ /**
+ * @return string
+ * @throws NoSuchEntityException
+ */
+ public function getTimeZone(): string
{
- return $this->backendView->getDateTime()->getConfigTimezone(
+ return (string) $this->backendView->getDateTime()->getConfigTimezone(
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$this->getStore()->getId()
);
@@ -76,7 +73,7 @@ public function getIndexName()
*
* @return array
*/
- public function getAnalyticsParams($additional = [])
+ public function getAnalyticsParams(array $additional = []): array
{
if (empty($this->analyticsParams)) {
$params = ['index' => $this->getIndexName()];
@@ -332,7 +329,7 @@ public function getNoResultSearches()
*
* @return bool
*/
- public function checkIsValidDateRange()
+ public function checkIsValidDateRange(): bool
{
if ($formData = $this->getBackendView()->getBackendSession()->getAlgoliaAnalyticsFormData()) {
if (!empty($formData['from'])) {
diff --git a/composer.json b/composer.json
index bc18202ab..7d77e5827 100755
--- a/composer.json
+++ b/composer.json
@@ -5,6 +5,7 @@
"license": ["MIT"],
"version": "3.13.2",
"require": {
+ "php": "~8.1|~8.2",
"magento/framework": "~102.0|~103.0",
"algolia/algoliasearch-client-php": "3.3.2",
"guzzlehttp/guzzle": "^6.3.3|^7.3.0",