Passed
Push — dev ( d91619...3d1f41 )
by Nico
14:25
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 getFounderDescription(): string
60
    {
61
        return $this->tidyString(
62
            $this->parameter('founder_description')->string()->defaultsToIfEmpty('Präsident')
63
        );
64
    }
65
66
    #[Override]
67
    public function getSuccessorDescription(): string
68
    {
69
        return $this->tidyString(
70
            $this->parameter('successor_description')->string()->defaultsToIfEmpty('Vize-Präsident')
71
        );
72
    }
73
74
    #[Override]
75
    public function getDiplomaticDescription(): string
76
    {
77
        return $this->tidyString(
78
            $this->parameter('diplomatic_description')->string()->defaultsToIfEmpty('Außenminister')
79
        );
80
    }
81
}
82