Passed
Push — master ( 66fdc9...e2b180 )
by Alexander
08:00 queued 05:21
created

ApplicationParameters::email()   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 1
dl 0
loc 5
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App;
6
7
final class ApplicationParameters
8
{
9
    private string $charset = 'UTF-8';
10
    private string $language = 'en';
11
    private string $name = 'My Project';
12
    private string $email = '[email protected]';
13
14 8
    public function getCharset(): string
15
    {
16 8
        return $this->charset;
17
    }
18
19
    public function getEmail(): string
20
    {
21
        return $this->email;
22
    }
23
24 8
    public function getLanguage(): string
25
    {
26 8
        return $this->language;
27
    }
28
29 8
    public function getName(): string
30
    {
31 8
        return $this->name;
32
    }
33
34 8
    public function charset(string $value): self
35
    {
36 8
        $new = clone $this;
37 8
        $new->charset = $value;
38 8
        return $new;
39
    }
40
41
    public function email(string $value): self
42
    {
43
        $new = clone $this;
44
        $new->email = $value;
45
        return $new;
46
    }
47
48 8
    public function language(string $value): self
49
    {
50 8
        $new = clone $this;
51 8
        $new->language = $value;
52 8
        return $new;
53
    }
54
55 8
    public function name(string $value): self
56
    {
57 8
        $new = clone $this;
58 8
        $new->name = $value;
59 8
        return $new;
60
    }
61
}
62