LocaleValueObject   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 17
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setLocale() 0 3 1
A __construct() 0 1 1
A __toString() 0 3 1
A getLocale() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lochmueller\LanguageDetection\Domain\Model\Dto;
6
7
class LocaleValueObject
8
{
9
    public function __construct(protected string $locale) {}
10
11
    public function getLocale(): string
12
    {
13
        return $this->locale;
14
    }
15
16
    public function setLocale(string $locale): void
17
    {
18
        $this->locale = $locale;
19
    }
20
21
    public function __toString()
22
    {
23
        return $this->getLocale();
24
    }
25
}
26