Passed
Push — master ( a5432c...54cbff )
by Marcel
16:00
created

TuitionGradeCategoryRepository::findAll()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace App\Repository;
4
5
use App\Entity\TuitionGradeCategory;
6
7
class TuitionGradeCategoryRepository extends AbstractRepository implements TuitionGradeCategoryRepositoryInterface {
8
9
    public function findAll(): array {
10
        return $this->em->getRepository(TuitionGradeCategory::class)
11
            ->findBy([], ['position' => 'asc']);
12
    }
13
14
    public function persist(TuitionGradeCategory $category): void {
15
        $this->em->persist($category);
16
        $this->em->flush();
17
    }
18
19
    public function remove(TuitionGradeCategory $category): void {
20
        $this->em->remove($category);
21
        $this->em->flush();
22
    }
23
}