diff --git a/Model/PaymentMethod/Layaways.php b/Model/PaymentMethod/Layaways.php index 4891ba1..745906c 100644 --- a/Model/PaymentMethod/Layaways.php +++ b/Model/PaymentMethod/Layaways.php @@ -67,10 +67,10 @@ public function __construct( \Magento\Payment\Model\Method\Logger $logger, OpenPosConfiguration $openPosConfiguration, TillSessionManagement $tillSessionManagement, - \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, - \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, + ?\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, + ?\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [], - DirectoryHelper $directory = null + ?DirectoryHelper $directory = null ) { parent::__construct( $context, @@ -93,7 +93,7 @@ public function __construct( * @param \Magento\Quote\Api\Data\CartInterface|null $quote * @return bool */ - public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null) + public function isAvailable(?\Magento\Quote\Api\Data\CartInterface $quote = null) { // Check if POS module is enabled if(!$this->openPosConfiguration->isEnabled()) { diff --git a/Model/TillSessionManagement.php b/Model/TillSessionManagement.php index 7b88f51..6da38dc 100644 --- a/Model/TillSessionManagement.php +++ b/Model/TillSessionManagement.php @@ -169,7 +169,7 @@ public function getTillSession(): ?TillSessionInterface * @param TillSessionInterface|null $tillSession * @return bool */ - public function isTillSessionActive(TillSessionInterface $tillSession = null): bool + public function isTillSessionActive(?TillSessionInterface $tillSession = null): bool { if($this->openPosConfiguration->isEnabled() !== true || $this->currentlyOnPosStore() == false) { $this->destroySession(); @@ -296,7 +296,7 @@ public function startTillSession(User $adminUser): TillSessionInterface * @param TillSessionInterface|null $tillSession * @return User|null */ - public function getAdminUserFromTillSession(TillSessionInterface $tillSession = null): ?User + public function getAdminUserFromTillSession(?TillSessionInterface $tillSession = null): ?User { if(!$tillSession) { $tillSession = $this->getTillSession();