Passed
Push — master ( 5fc2ed...cfc9ff )
by Marcel
05:20
created

BookSettings::setExcludeStudentsStatus()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Settings;
4
5
class BookSettings extends AbstractSettings {
6
7
    /**
8
     * @return int[]
9
     */
10
    public function getGradesGradeTeacherExcuses(): array {
11
        return $this->getValue('book.excuses.grades_grade_teacher_excuses', [ ]);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getValue('...cher_excuses', array()) could return the type null which is incompatible with the type-hinted return array. Consider adding an additional type-check to rule them out.
Loading history...
12
    }
13
14
    /**
15
     * @param int[] $ids
16
     */
17
    public function setGradesGradeTeacherExcuses(array $ids): void {
18
        $this->setValue('book.excuses.grades_grade_teacher_excuses', $ids);
19
    }
20
21
    /**
22
     * @return int[]
23
     */
24
    public function getGradesTuitionTeacherExcuses(): array {
25
        return $this->getValue('book.excuses.grades_tuition_teacher_excuses', [ ]);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getValue('...cher_excuses', array()) could return the type null which is incompatible with the type-hinted return array. Consider adding an additional type-check to rule them out.
Loading history...
26
    }
27
28
    /**
29
     * @param int[] $ids
30
     */
31
    public function setGradesTuitionTeacherExcuses(array $ids): void {
32
        $this->setValue('book.excuses.grades_tuition_teacher_excuses', $ids);
33
    }
34
35
    public function getExcludeStudentsStatus(): array {
36
        return $this->getValue('book.exclude_students_status', [ ]);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getValue('...dents_status', array()) could return the type null which is incompatible with the type-hinted return array. Consider adding an additional type-check to rule them out.
Loading history...
37
    }
38
39
    public function setExcludeStudentsStatus(array $status): void {
40
        $this->setValue('book.exclude_students_status', $status);
41
    }
42
}