Code Duplication    Length = 8-8 lines in 3 locations

src/OroCRM/Bundle/CampaignBundle/Dashboard/CampaignDataProvider.php 3 locations

@@ 46-53 (lines=8) @@
43
     *
44
     * @return array
45
     */
46
    public function getCampaignLeadsData(array $dateRange)
47
    {
48
        $qb = $this->getCampaignRepository()->getCampaignsLeadsQB('lead');
49
        $qb->setMaxResults(self::CAMPAIGN_LEAD_COUNT);
50
        $this->dateFilterProcessor->process($qb, $dateRange, 'lead.createdAt');
51
52
        return $this->aclHelper->apply($qb)->getArrayResult();
53
    }
54
55
    /**
56
     * @param array $dateRange
@@ 60-67 (lines=8) @@
57
     *
58
     * @return array
59
     */
60
    public function getCampaignOpportunitiesData(array $dateRange)
61
    {
62
        $qb = $this->getCampaignRepository()->getCampaignsOpportunitiesQB('opportunities');
63
        $qb->setMaxResults(self::CAMPAIGN_OPPORTUNITY_COUNT);
64
        $this->dateFilterProcessor->process($qb, $dateRange, 'opportunities.createdAt');
65
66
        return $this->aclHelper->apply($qb)->getArrayResult();
67
    }
68
69
    /**
70
     * @param array $dateRange
@@ 74-81 (lines=8) @@
71
     *
72
     * @return array
73
     */
74
    public function getCampaignsByCloseRevenueData(array $dateRange)
75
    {
76
        $qb = $this->getCampaignRepository()->getCampaignsByCloseRevenueQB('opportunities');
77
        $qb->setMaxResults(self::CAMPAIGN_CLOSE_REVENUE_COUNT);
78
        $this->dateFilterProcessor->process($qb, $dateRange, 'opportunities.createdAt');
79
80
        return $this->aclHelper->apply($qb)->getArrayResult();
81
    }
82
83
    /**
84
     * @return CampaignRepository