Completed
Push — master ( 18696f...4ea9b4 )
by Serhii
04:47 queued 11s
created

PerformanceRepository::findAllWithinSeasons()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace App\Repository;
4
5
use App\Entity\Performance;
6
use Doctrine\Common\Persistence\ManagerRegistry;
7
8
class PerformanceRepository extends AbstractRepository
9
{
10 18
    public function __construct(ManagerRegistry $registry)
11
    {
12 18
        parent::__construct($registry, Performance::class);
13 18
    }
14
15
    /**
16
     * @return array|Performance[]
17
     */
18 1
    public function findAllWithinSeasons()
19
    {
20 1
        return $this->createQueryBuilder('p')
21 1
            ->innerJoin('p.seasons', 'ps')
22 1
            ->groupBy('p.id')
23 1
            ->getQuery()
24 1
            ->execute();
25
    }
26
}
27