diff --git a/Block/Adminhtml/Order/Create/Installation.php b/Block/Adminhtml/Order/Create/Installation.php
index ee846c26..4ed3242e 100644
--- a/Block/Adminhtml/Order/Create/Installation.php
+++ b/Block/Adminhtml/Order/Create/Installation.php
@@ -23,7 +23,7 @@ class Installation extends Template
public function __construct(
\Magento\Backend\Block\Template\Context $context,
- \Magento\Backend\Model\Session\Quote $quote = null,
+ ?\Magento\Backend\Model\Session\Quote $quote = null,
array $data = []
){
$this->quote = $quote ?? \Magento\Framework\App\ObjectManager::getInstance()
diff --git a/Console/Command/CreateContracts.php b/Console/Command/CreateContracts.php
index 129f2522..a9fb6f77 100644
--- a/Console/Command/CreateContracts.php
+++ b/Console/Command/CreateContracts.php
@@ -70,7 +70,7 @@ public function __construct(
DataHelper $dataHelper,
ContractCreateProcess $contractCreateProcess,
LoggerInterface $logger,
- string $name = null
+ ?string $name = null
) {
$this->appState = $appState;
$this->dataHelper = $dataHelper;
diff --git a/Console/Command/CreateWarrantyProduct.php b/Console/Command/CreateWarrantyProduct.php
index 0afa714c..f1fca48e 100644
--- a/Console/Command/CreateWarrantyProduct.php
+++ b/Console/Command/CreateWarrantyProduct.php
@@ -86,7 +86,7 @@ public function __construct(
LoggerInterface $logger,
ResourceProductFactory $resourceProductFactory,
StoreManagerInterface $storeManager,
- string $name = null
+ ?string $name = null
) {
parent::__construct($name);
$this->productRepository = $productRepository;
diff --git a/Console/Command/ResetProductSyncFlag.php b/Console/Command/ResetProductSyncFlag.php
index c8ba97b3..0ffdcbb5 100644
--- a/Console/Command/ResetProductSyncFlag.php
+++ b/Console/Command/ResetProductSyncFlag.php
@@ -60,7 +60,7 @@ public function __construct(
AppState $appState,
FlagManager $flagManager,
LoggerInterface $logger,
- string $name = null
+ ?string $name = null
) {
$this->appState = $appState;
$this->flagManager = $flagManager;
diff --git a/Console/Command/SendOrders.php b/Console/Command/SendOrders.php
index d18e13af..a23ee915 100644
--- a/Console/Command/SendOrders.php
+++ b/Console/Command/SendOrders.php
@@ -104,7 +104,7 @@ public function __construct(
HistoricalOrdersSyncProcess $sendHistoricalOrders,
GetAfterDate $getAfterDate,
LoggerInterface $logger,
- string $name = null
+ ?string $name = null
) {
parent::__construct($name);
$this->appState = $appState;
diff --git a/Console/Command/SyncProducts.php b/Console/Command/SyncProducts.php
index 69fa2d17..87478413 100644
--- a/Console/Command/SyncProducts.php
+++ b/Console/Command/SyncProducts.php
@@ -88,7 +88,7 @@ public function __construct(
FlagManager $flagManager,
ProductSyncProcess $productSyncProcess,
LoggerInterface $logger,
- string $name = null
+ ?string $name = null
) {
parent::__construct($name);
$this->appState = $appState;
diff --git a/Model/Config/Backend/ContractCreationCronSchedule.php b/Model/Config/Backend/ContractCreationCronSchedule.php
index f7e2638d..e254dff6 100644
--- a/Model/Config/Backend/ContractCreationCronSchedule.php
+++ b/Model/Config/Backend/ContractCreationCronSchedule.php
@@ -52,8 +52,8 @@ public function __construct(
ScopeConfigInterface $config,
TypeListInterface $cacheTypeList,
Helper $helper,
- AbstractResource $resource = null,
- AbstractDb $resourceCollection = null,
+ ?AbstractResource $resource = null,
+ ?AbstractDb $resourceCollection = null,
array $data = []
) {
$this->helper = $helper;
diff --git a/Model/Config/Backend/OrdersSyncCronSchedule.php b/Model/Config/Backend/OrdersSyncCronSchedule.php
index 2dbca8ed..cd2d23d9 100644
--- a/Model/Config/Backend/OrdersSyncCronSchedule.php
+++ b/Model/Config/Backend/OrdersSyncCronSchedule.php
@@ -50,8 +50,8 @@ public function __construct(
ScopeConfigInterface $config,
TypeListInterface $cacheTypeList,
Helper $helper,
- AbstractResource $resource = null,
- AbstractDb $resourceCollection = null,
+ ?AbstractResource $resource = null,
+ ?AbstractDb $resourceCollection = null,
array $data = []
) {
$this->helper = $helper;
diff --git a/Model/Config/Backend/ProductSyncCronSchedule.php b/Model/Config/Backend/ProductSyncCronSchedule.php
index 52c9e06d..92fd4937 100644
--- a/Model/Config/Backend/ProductSyncCronSchedule.php
+++ b/Model/Config/Backend/ProductSyncCronSchedule.php
@@ -52,8 +52,8 @@ public function __construct(
ScopeConfigInterface $config,
TypeListInterface $cacheTypeList,
Helper $helper,
- AbstractResource $resource = null,
- AbstractDb $resourceCollection = null,
+ ?AbstractResource $resource = null,
+ ?AbstractDb $resourceCollection = null,
array $data = []
) {
$this->helper = $helper;
diff --git a/Model/Product/Type.php b/Model/Product/Type.php
index f5142261..66370b5c 100644
--- a/Model/Product/Type.php
+++ b/Model/Product/Type.php
@@ -94,7 +94,7 @@ public function __construct(
\Psr\Log\LoggerInterface $logger,
ProductRepositoryInterface $productRepository,
Data $helper,
- \Magento\Framework\Serialize\Serializer\Json $serializer = null
+ ?\Magento\Framework\Serialize\Serializer\Json $serializer = null
)
{
$this->helper = $helper;
diff --git a/Model/ProductSyncProcess.php b/Model/ProductSyncProcess.php
index 12e94610..cec64a5e 100644
--- a/Model/ProductSyncProcess.php
+++ b/Model/ProductSyncProcess.php
@@ -125,7 +125,7 @@ public function __construct(
* @param int|null $defaultBatchSize
* @return void
*/
- public function execute(int $defaultBatchSize = null)
+ public function execute(?int $defaultBatchSize = null)
{
$stores = $this->storeManager->getStores();
foreach ($stores as $storeId => $store) {
diff --git a/ViewModel/Warranty.php b/ViewModel/Warranty.php
index 9e0866aa..82059c33 100644
--- a/ViewModel/Warranty.php
+++ b/ViewModel/Warranty.php
@@ -193,7 +193,7 @@ public function __construct(
*
* @return bool
*/
- public function isExtendEnabled(int $storeId = null): bool
+ public function isExtendEnabled(?int $storeId = null): bool
{
$result = false;
@@ -493,7 +493,7 @@ public function isPostPurchaseLeadModalEnabled(): bool
* @param $storeId
* @return bool
*/
- public function isOrderOffersEnabled($storeId = null): bool
+ public function isOrderOffersEnabled(?string $storeId = null): bool
{
return $this->dataHelper->isOrderOffersEnabled($storeId);
}
@@ -666,7 +666,7 @@ public function getProductInfo($product)
];
}
- public function getOrderIncrementId($orderId = null){
+ public function getOrderIncrementId(string|int|null $orderId = null){
if ($orderId){
$order = $this->orderRepository->get($orderId);
$incrementId = $order->getIncrementId();