| Total Complexity | 10 |
| Total Lines | 66 |
| Duplicated Lines | 0 % |
| Coverage | 80% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class ApplicationParameters |
||
| 10 | { |
||
| 11 | private string $charset = 'UTF-8'; |
||
| 12 | private string $language = 'en'; |
||
| 13 | private string $name = 'My Project'; |
||
| 14 | private string $email = '[email protected]'; |
||
| 15 | private string $csrfAttribute = Csrf::REQUEST_NAME; |
||
| 16 | |||
| 17 | 8 | public function getCharset(): string |
|
| 18 | { |
||
| 19 | 8 | return $this->charset; |
|
| 20 | } |
||
| 21 | |||
| 22 | public function getEmail(): string |
||
| 23 | { |
||
| 24 | return $this->email; |
||
| 25 | } |
||
| 26 | |||
| 27 | 8 | public function getLanguage(): string |
|
| 28 | { |
||
| 29 | 8 | return $this->language; |
|
| 30 | } |
||
| 31 | |||
| 32 | 8 | public function getName(): string |
|
| 33 | { |
||
| 34 | 8 | return $this->name; |
|
| 35 | } |
||
| 36 | |||
| 37 | 6 | public function getCsrfAttribute(): string |
|
| 40 | } |
||
| 41 | |||
| 42 | 8 | public function charset(string $value): self |
|
| 43 | { |
||
| 44 | 8 | $new = clone $this; |
|
| 45 | 8 | $new->charset = $value; |
|
| 46 | 8 | return $new; |
|
| 47 | } |
||
| 48 | |||
| 49 | public function email(string $value): self |
||
| 50 | { |
||
| 51 | $new = clone $this; |
||
| 52 | $new->email = $value; |
||
| 53 | return $new; |
||
| 54 | } |
||
| 55 | |||
| 56 | 8 | public function language(string $value): self |
|
| 57 | { |
||
| 58 | 8 | $new = clone $this; |
|
| 59 | 8 | $new->language = $value; |
|
| 60 | 8 | return $new; |
|
| 61 | } |
||
| 62 | |||
| 63 | 8 | public function name(string $value): self |
|
| 68 | } |
||
| 69 | |||
| 70 | 8 | public function csrfAttribute(string $value): self |
|
| 71 | { |
||
| 72 | 8 | $new = clone $this; |
|
| 73 | 8 | $new->csrfAttribute = $value; |
|
| 74 | 8 | return $new; |
|
| 75 | } |
||
| 76 | } |
||
| 77 |