diff --git a/Block/Product/RatingSnippet.php b/Block/Product/RatingSnippet.php index c6227aa..5984513 100644 --- a/Block/Product/RatingSnippet.php +++ b/Block/Product/RatingSnippet.php @@ -39,10 +39,10 @@ public function __construct( \Magento\Catalog\Api\CategoryRepositoryInterface $categoryRepository, \Magento\Framework\Url\Helper\Data $urlHelper, array $data = [], - \Magento\Customer\Model\Session $customerSession = null, - \Magento\Catalog\Model\CategoryFactory $categoryFactory = null, - ReviewsConfig $reviewsConfigHelper = null, - StoreManagerInterface $storeManager = null + ?\Magento\Customer\Model\Session $customerSession = null, + ?\Magento\Catalog\Model\CategoryFactory $categoryFactory = null, + ?ReviewsConfig $reviewsConfigHelper = null, + ?StoreManagerInterface $storeManager = null ) { $this->_customerSession = $customerSession; $this->categoryFactory = $categoryFactory; diff --git a/Block/Richsnippet.php b/Block/Richsnippet.php index 008e214..2dd9067 100755 --- a/Block/Richsnippet.php +++ b/Block/Richsnippet.php @@ -85,7 +85,7 @@ public function getRichSnippetSource() return ''; } - public function getRichSnippet($sku = null, $product = null) + public function getRichSnippet(?$sku = null, ?$product = null) { if (isset($sku) && is_array($sku)) { $sku = implode(';', $sku); diff --git a/Model/Api.php b/Model/Api.php index dee0a0e..6d59409 100755 --- a/Model/Api.php +++ b/Model/Api.php @@ -25,7 +25,7 @@ public function __construct( $this->store = $storeManagerInterface->getStore(); } - public function apiPost($url, $data, $magento_store_id = null) + public function apiPost($url, $data, ?$magento_store_id = null) { if ($magento_store_id == null) { $magento_store_id = $this->store->getId(); @@ -51,7 +51,7 @@ public function apiPost($url, $data, $magento_store_id = null) return $response; } - protected function getApiDomain($magento_store_id = null) + protected function getApiDomain(?$magento_store_id = null) { return $this->configHelper->getRegion($magento_store_id) == 'US' ? 'api.reviews.io' : 'api.reviews.co.uk'; }