Passed
Push — master ( aec003...e09ad0 )
by Marcel
08:04
created

SubstitutionViewItem::getBlockName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 2
ccs 0
cts 1
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace App\Dashboard;
4
5
use App\Entity\Student;
6
use App\Entity\Substitution;
7
use App\Entity\TeacherAbsenceLesson;
8
use App\Entity\TimetableLesson;
9
10
class SubstitutionViewItem extends AbsenceAwareViewItem {
11
12
    public function __construct(private Substitution $substitution, private bool $isFreeLessonType, private array $students, array $absentStudentGroups, private readonly ?TimetableLesson $lesson, private readonly ?TeacherAbsenceLesson $absenceLesson) {
13
        parent::__construct($absentStudentGroups);
14
    }
15
16
    public function isFreeLesson(): bool {
17
        return $this->isFreeLessonType;
18
    }
19
20
    public function getSubstitution(): Substitution {
21
        return $this->substitution;
22
    }
23
24
    public function getTimetableLesson(): ?TimetableLesson {
25
        return $this->lesson;
26
    }
27
28
    public function getAbsenceLesson(): ?TeacherAbsenceLesson {
29
        return $this->absenceLesson;
30
    }
31
32
    /**
33
     * @return Student[]
34
     */
35
    public function getStudents(): array {
36
        return $this->students;
37
    }
38
39
    public function getBlockName(): string {
40
        return 'substitution';
41
    }
42
}