Code Duplication    Length = 9-9 lines in 2 locations

src/AppBundle/Entity/OrdersRepository.php 2 locations

@@ 28-36 (lines=9) @@
25
     * @param integer $count Nombre d'élément à afficher
26
     * @return array Query result
27
     */
28
    public function getLastOrder($count)
29
    {
30
        $query = $this->getLast($count)
31
            ->where('o.orderdate < ' . date('d-m-Y'))
32
            ->andWhere('o.status = 1')
33
            ->getQuery();
34
35
        return $query->getResult();
36
    }
37
38
    /**
39
     * Renvoi les dernières commandes.
@@ 44-52 (lines=9) @@
41
     * @param integer $count Nombre d'élément à afficher
42
     * @return array Query result
43
     */
44
    public function getLastDelivery($count)
45
    {
46
        $query = $this->getLast($count)
47
            ->where('o.delivdate >= ' . date('d-m-Y'))
48
            ->andWhere('o.status = 1')
49
            ->getQuery();
50
51
        return $query->getResult();
52
    }
53
}
54