Passed
Push — master ( ea7d0c...20f36e )
by Marcel
09:46
created

ImportSettings::setFallbackSection()   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 0
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace App\Settings;
4
5
class ImportSettings extends AbstractSettings {
6 2
    public function getExamRules(): array {
7 2
        return $this->getValue('import.exam_write_rules', [ ]);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getValue('..._write_rules', 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...
8
    }
9
10
    public function setExamRules(array $rules): void {
11
        $this->setValue('import.exam_write_rules', $rules);
12
    }
13
14
    public function getFallbackSection(): ?int {
15
        return $this->getValue('import.fallback_section');
16
    }
17
18
    public function setFallbackSection(?int $sectionId): void {
19
        $this->setValue('import.fallback_section', $sectionId);
20
    }
21
22
    public function getSubjectsWithoutTuition(): array {
23
        return $this->getValue('import.subjects_without_tuition', [ ]);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getValue('...hout_tuition', 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...
24
    }
25
26
    public function setSubjectsWithoutTuition(array $subjects): void {
27
        $this->setValue('import.subjects_without_tuition', $subjects);
28
    }
29
}