CommunityRepository::countAll()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace App\Repository\Community;
4
5
use Doctrine\ORM\EntityRepository;
6
7
class CommunityRepository extends EntityRepository
8
{
9 1
    public function countAll()
10
    {
11
        return (int) $this
12 1
            ->createQueryBuilder('c')
13 1
            ->select('COUNT(c) as nb_communities')
14 1
            ->getQuery()
15 1
            ->getSingleScalarResult()
16
        ;
17
    }
18
}