Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 198-206 (lines=9) @@
195
     * @return int
196
     * @throws \Doctrine\ORM\NonUniqueResultException
197
     */
198
    public function getAbandonedRevenueByPeriod(\DateTime $start, \DateTime $end, AclHelper $aclHelper)
199
    {
200
        $qb = $this->getAbandonedQB($start, $end);
201
        $qb->select('SUM(cart.grandTotal) as val');
202
        $this->applyActiveChannelLimitation($qb);
203
        $value = $aclHelper->apply($qb)->getOneOrNullResult();
204
205
        return $value['val'] ? : 0;
206
    }
207
208
    /**
209
     * @param \DateTime $start
@@ 216-224 (lines=9) @@
213
     * @return int
214
     * @throws \Doctrine\ORM\NonUniqueResultException
215
     */
216
    public function getAbandonedCountByPeriod(\DateTime $start, \DateTime $end, AclHelper $aclHelper)
217
    {
218
        $qb = $this->getAbandonedQB($start, $end);
219
        $qb->select('COUNT(cart.grandTotal) as val');
220
        $this->applyActiveChannelLimitation($qb);
221
        $value = $aclHelper->apply($qb)->getOneOrNullResult();
222
223
        return $value['val'] ? : 0;
224
    }
225
226
    /**
227
     * @param \DateTime $start