Code Duplication    Length = 9-9 lines in 2 locations

src/OroCRM/Bundle/MagentoBundle/Entity/Repository/CartRepository.php 2 locations

@@ 190-198 (lines=9) @@
187
     * @return int
188
     * @throws \Doctrine\ORM\NonUniqueResultException
189
     */
190
    public function getAbandonedRevenueByPeriod(\DateTime $start, \DateTime $end, AclHelper $aclHelper)
191
    {
192
        $qb = $this->getAbandonedQB($start, $end);
193
        $qb->select('SUM(cart.grandTotal) as val');
194
        $this->applyActiveChannelLimitation($qb);
195
        $value = $aclHelper->apply($qb)->getOneOrNullResult();
196
197
        return $value['val'] ? : 0;
198
    }
199
200
    /**
201
     * @param \DateTime $start
@@ 207-215 (lines=9) @@
204
     * @return int
205
     * @throws \Doctrine\ORM\NonUniqueResultException
206
     */
207
    public function getAbandonedCountByPeriod(\DateTime $start, \DateTime $end, AclHelper $aclHelper)
208
    {
209
        $qb = $this->getAbandonedQB($start, $end);
210
        $qb->select('COUNT(cart.grandTotal) as val');
211
        $this->applyActiveChannelLimitation($qb);
212
        $value = $aclHelper->apply($qb)->getOneOrNullResult();
213
214
        return $value['val'] ? : 0;
215
    }
216
217
    /**
218
     * @param \DateTime $start