File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
CatalogInventory/Model/ResourceModel
Elasticsearch/Model/ResourceModel/Fulltext/Collection Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,11 @@ class StockStatusFilter implements StockStatusFilterInterface
21
21
private const TABLE_NAME = 'cataloginventory_stock_status ' ;
22
22
23
23
/**
24
- * @var bool|null
24
+ * Storefront search result applier flag
25
+ *
26
+ * @var bool
25
27
*/
26
- private ?bool $ searchResultApplier = null ;
28
+ private ?bool $ searchResultApplier = false ;
27
29
28
30
/**
29
31
* @var ResourceConnection
@@ -62,7 +64,7 @@ public function setSearchResultApplier(bool $status): void
62
64
*
63
65
* @return bool
64
66
*/
65
- public function getSearchResultApplier () : bool
67
+ public function hasSearchResultApplier () : bool
66
68
{
67
69
return $ this ->searchResultApplier ;
68
70
}
@@ -93,7 +95,7 @@ public function execute(
93
95
implode (' AND ' , $ joinCondition ),
94
96
[]
95
97
);
96
- if (!$ this ->getSearchResultApplier ()) {
98
+ if (!$ this ->hasSearchResultApplier ()) {
97
99
$ select ->where ("{$ stockStatusTableAlias }.stock_status = ? " , StockStatusInterface::STATUS_IN_STOCK );
98
100
}
99
101
Original file line number Diff line number Diff line change 17
17
18
18
/**
19
19
* Resolve specific attributes for search criteria.
20
+ *
21
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
20
22
*/
21
23
class SearchResultApplier implements SearchResultApplierInterface
22
24
{
You can’t perform that action at this time.
0 commit comments