Skip to content

Commit d58fbfb

Browse files
authored
Merge pull request #60 from tuyennn/feature/issue-59-php84
[fix] PHP 8.4 compatibiltiy
2 parents a96f3d8 + e035ed5 commit d58fbfb

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Model/ResourceModel/Inventory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(
5353
Manager $moduleManager,
5454
StockRegistryInterface $stockRegistry,
5555
Context $context,
56-
string $connectionName = null
56+
?string $connectionName = null
5757
) {
5858
parent::__construct($context, $connectionName);
5959
$this->moduleManager = $moduleManager;

Plugin/Model/ResourceModel/Product/CollectionPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private function applyOutOfStockAtLastOrders(Collection $collection)
102102
public function beforeAddOrder(
103103
Collection $subject,
104104
$attribute,
105-
string $dir = Select::SQL_DESC
105+
$dir = Select::SQL_DESC
106106
): array {
107107
if (!$subject->getFlag('is_processing')) {
108108
$result = $this->beforeSetOrder($subject, $attribute, $dir);
@@ -124,7 +124,7 @@ public function aroundAddAttributeToSort(
124124
Collection $collection,
125125
callable $proceed,
126126
string $attribute,
127-
string $dir = Collection::SORT_ORDER_ASC
127+
$dir = Collection::SORT_ORDER_ASC
128128
): Collection {
129129
if (!$collection->getFlag(sprintf('sorted_by_%s_attribute', $attribute))) {
130130
$collection->setFlag(sprintf('sorted_by_%s_attribute', $attribute), true);

0 commit comments

Comments
 (0)