Passed
Push — dev ( 79c88c...be1bbd )
by Nico
05:18
created

EditDetailsRequest::getSuccessorDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Module\Alliance\Action\EditDetails;
6
7
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Stu\Lib\Request\CustomControllerHelperTrait;
9
10
final class EditDetailsRequest implements EditDetailsRequestInterface
11
{
12
    use CustomControllerHelperTrait;
13
14 2
    #[Override]
15
    public function getName(): string
16
    {
17 2
        return $this->tidyString(
18 2
            $this->parameter('name')->string()->required()
19 2
        );
20
    }
21
22 2
    #[Override]
23
    public function getHomepage(): string
24
    {
25 2
        return $this->tidyString(
26 2
            $this->parameter('homepage')->string()->defaultsToIfEmpty('')
27 2
        );
28
    }
29
30 2
    #[Override]
31
    public function getDescription(): string
32
    {
33 2
        return $this->tidyString(
34 2
            $this->parameter('description')->string()->defaultsToIfEmpty('')
35 2
        );
36
    }
37
38 2
    #[Override]
39
    public function getFactionMode(): int
40
    {
41 2
        return $this->parameter('factionid')->int()->defaultsTo(0);
42
    }
43
44 2
    #[Override]
45
    public function getAcceptApplications(): int
46
    {
47 2
        return $this->parameter('acceptapp')->int()->defaultsTo(0);
48
    }
49
50 2
    #[Override]
51
    public function getRgbCode(): string
52
    {
53 2
        return $this->tidyString(
54 2
            $this->parameter('rgb')->string()->required()
55 2
        );
56
    }
57
58
    #[Override]
59
    public function getJobIdFounder(): int
60
    {
61
        return $this->parameter('job_id_founder')->int()->defaultsTo(0);
62
    }
63
64
    #[Override]
65
    public function getJobTitleFounder(): string
66
    {
67
        return $this->tidyString(
68
            $this->parameter('job_title_founder')->string()->defaultsToIfEmpty('')
69
        );
70
    }
71
72
    #[Override]
73
    public function getJobIdSuccessor(): int
74
    {
75
        return $this->parameter('job_id_successor')->int()->defaultsTo(0);
76
    }
77
78
    #[Override]
79
    public function getJobTitleSuccessor(): string
80
    {
81
        return $this->tidyString(
82
            $this->parameter('job_title_successor')->string()->defaultsToIfEmpty('')
83
        );
84
    }
85
86
    #[Override]
87
    public function getJobIdDiplomatic(): int
88
    {
89
        return $this->parameter('job_id_diplomatic')->int()->defaultsTo(0);
90
    }
91
92
    #[Override]
93
    public function getJobTitleDiplomatic(): string
94
    {
95
        return $this->tidyString(
96
            $this->parameter('job_title_diplomatic')->string()->defaultsToIfEmpty('')
97
        );
98
    }
99
}
100