Locale   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 45
ccs 5
cts 5
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace CodeZero\BrowserLocale;
4
5
class Locale
6
{
7
    /**
8
     * Full locale with language and optional country code.
9
     *
10
     * @var string
11
     */
12
    public $locale;
13
14
    /**
15
     * Language code of the locale.
16
     *
17
     * @var string
18
     */
19
    public $language;
20
21
    /**
22
     * Country code of the locale, if available.
23
     *
24
     * @var string
25
     */
26
    public $country;
27
28
    /**
29
     * An indicator of importance, where 1.0 is most
30
     * important and 0.0 is least important.
31
     *
32
     * @var float
33
     */
34
    public $weight;
35
36
    /**
37
     * Create a new Locale instance.
38
     *
39
     * @param string $locale
40
     * @param string $language
41
     * @param string $country
42
     * @param float $weight
43
     */
44 8
    public function __construct($locale, $language, $country, $weight)
45
    {
46 8
        $this->locale = $locale;
47 8
        $this->language = $language;
48 8
        $this->country = $country;
49 8
        $this->weight = $weight;
50 8
    }
51
}
52