MealRepository   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 22
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A findOrderedByPosition() 0 9 1
A countAll() 0 9 1
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\EntityRepository;
6
7
class MealRepository extends EntityRepository
8
{
9
    public function findOrderedByPosition()
10
    {
11
        return $this
12
            ->createQueryBuilder('m')
13
            ->orderBy('m.position', 'ASC')
14
            ->getQuery()
15
            ->getResult()
16
        ;
17
    }
18
19
    public function countAll()
20
    {
21
        return $this
22
            ->createQueryBuilder('m')
23
            ->select('COUNT(m.id)')
24
            ->getQuery()
25
            ->getSingleScalarResult()
26
        ;
27
    }
28
}
29