Skip to content

Commit 23f2d5c

Browse files
Update addCategoriesFilter to return $this
To keep consistency addCategoriesFilter should return $this. All Other methods seems to use fluent API.
1 parent 73bf648 commit 23f2d5c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,7 @@ public function addCategoryFilter(\Magento\Catalog\Model\Category $category)
852852
* Filter Product by Categories
853853
*
854854
* @param array $categoriesFilter
855+
* @return $this
855856
*/
856857
public function addCategoriesFilter(array $categoriesFilter)
857858
{
@@ -865,6 +866,7 @@ public function addCategoriesFilter(array $categoriesFilter)
865866
];
866867
$this->getSelect()->where($this->getConnection()->prepareSqlCondition('e.entity_id' , $selectCondition));
867868
}
869+
return $this;
868870
}
869871

870872
/**

0 commit comments

Comments
 (0)