| Total Complexity | 10 |
| Total Lines | 66 |
| Duplicated Lines | 0 % |
| Coverage | 75% |
| 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 | 8 | private string $email = '[email protected]'; |
|
| 15 | private string $csrfAttribute = Csrf::REQUEST_NAME; |
||
| 16 | 8 | ||
| 17 | public function getCharset(): string |
||
| 18 | { |
||
| 19 | return $this->charset; |
||
| 20 | } |
||
| 21 | |||
| 22 | public function getEmail(): string |
||
| 23 | { |
||
| 24 | 8 | return $this->email; |
|
| 25 | } |
||
| 26 | 8 | ||
| 27 | public function getLanguage(): string |
||
| 28 | { |
||
| 29 | 8 | return $this->language; |
|
| 30 | } |
||
| 31 | 8 | ||
| 32 | public function getName(): string |
||
| 33 | { |
||
| 34 | 8 | return $this->name; |
|
| 35 | } |
||
| 36 | 8 | ||
| 37 | 8 | public function getCsrfAttribute(): string |
|
| 38 | 8 | { |
|
| 39 | return $this->csrfAttribute; |
||
| 40 | } |
||
| 41 | |||
| 42 | public function charset(string $value): self |
||
| 43 | { |
||
| 44 | $new = clone $this; |
||
| 45 | $new->charset = $value; |
||
| 46 | return $new; |
||
| 47 | } |
||
| 48 | 8 | ||
| 49 | public function email(string $value): self |
||
| 50 | 8 | { |
|
| 51 | 8 | $new = clone $this; |
|
| 52 | 8 | $new->email = $value; |
|
| 53 | return $new; |
||
| 54 | } |
||
| 55 | 8 | ||
| 56 | public function language(string $value): self |
||
| 57 | 8 | { |
|
| 58 | 8 | $new = clone $this; |
|
| 59 | 8 | $new->language = $value; |
|
| 60 | return $new; |
||
| 61 | } |
||
| 62 | |||
| 63 | public function name(string $value): self |
||
| 68 | } |
||
| 69 | |||
| 70 | public function csrfAttribute(string $value): self |
||
| 71 | { |
||
| 72 | $new = clone $this; |
||
| 73 | $new->csrfAttribute = $value; |
||
| 74 | return $new; |
||
| 75 | } |
||
| 76 | } |
||
| 77 |