Completed
Push — master ( 3e3269...414f6c )
by Valentyn
05:10
created

LocaleService   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 21
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getDefaultLocale() 0 4 1
A getLocales() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace App\Service;
5
6
class LocaleService
7
{
8
    private $locale;
9
    private $locales;
10
11
    public function __construct(string $defaultLocale, array $locales)
12
    {
13
        $this->locale = $defaultLocale;
14
        $this->locales = $locales;
15
    }
16
17
    public function getDefaultLocale(): string
18
    {
19
        return $this->locale;
20
    }
21
22
    public function getLocales(): array
23
    {
24
        return $this->locales;
25
    }
26
}