Passed
Push — master ( 5925d2...8c8f24 )
by Alexander
18:53 queued 16:43
created

ApplicationParameters::getCharset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
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