Passed
Push — master ( 1db685...9f6916 )
by Alexander
01:55
created

ApplicationParameters   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 16
c 2
b 0
f 0
dl 0
loc 40
ccs 18
cts 18
cp 1
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A name() 0 5 1
A charset() 0 5 1
A getCharset() 0 3 1
A language() 0 5 1
A getLanguage() 0 3 1
A getName() 0 3 1
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
13 1
    public function getCharset(): string
14
    {
15 1
        return $this->charset;
16
    }
17
18 1
    public function getLanguage(): string
19
    {
20 1
        return $this->language;
21
    }
22
23 1
    public function getName(): string
24
    {
25 1
        return $this->name;
26
    }
27
28 1
    public function charset(string $value): self
29
    {
30 1
        $new = clone $this;
31 1
        $new->charset = $value;
32 1
        return $new;
33
    }
34
35 1
    public function language(string $value): self
36
    {
37 1
        $new = clone $this;
38 1
        $new->language = $value;
39 1
        return $new;
40
    }
41
42 1
    public function name(string $value): self
43
    {
44 1
        $new = clone $this;
45 1
        $new->name = $value;
46 1
        return $new;
47
    }
48
}
49