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

BookSettings   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 36
rs 10
c 1
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getGradesGradeTeacherExcuses() 0 2 1
A setGradesTuitionTeacherExcuses() 0 2 1
A setGradesGradeTeacherExcuses() 0 2 1
A getGradesTuitionTeacherExcuses() 0 2 1
A setExcludeStudentsStatus() 0 2 1
A getExcludeStudentsStatus() 0 2 1
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
}