Code Duplication    Length = 8-8 lines in 2 locations

Block/Checkout/Cart/Crosssell.php 1 location

@@ 127-134 (lines=8) @@
124
     * @param $personalisedIds
125
     * @return $this
126
     */
127
    private function _getPersonalisedProductCollection($personalisedIds)
128
    {
129
        $collection = $this->_productFactory->create()->getCollection()
130
            ->addAttributeToFilter('entity_id', ['in', $personalisedIds])
131
            ->addAttributeToFilter('visibility', Visibility::VISIBILITY_BOTH)
132
            ->addAttributeToFilter('status', array('eq' => 1));
133
        return $collection;
134
    }
135
}
136

Block/Product/ProductList/Upsell.php 1 location

@@ 142-149 (lines=8) @@
139
     * @param $personalisedIds
140
     * @return $this
141
     */
142
    private function _getPersonalisedProductCollection($personalisedIds)
143
    {
144
        $collection = $this->_productFactory->create()->getCollection()
145
            ->addAttributeToFilter('entity_id', ['in', $personalisedIds])
146
            ->addAttributeToFilter('visibility', Visibility::VISIBILITY_BOTH)
147
            ->addAttributeToFilter('status', array('eq' => 1));
148
        return $collection;
149
    }
150
}
151