Completed
Push — master ( 4b4318...02813d )
by Ivan
01:55
created

Locale::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 4
crap 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 7
    public function __construct($locale, $language, $country, $weight)
45
    {
46 7
        $this->locale = $locale;
47 7
        $this->language = $language;
48 7
        $this->country = $country;
49 7
        $this->weight = $weight;
50 7
    }
51
}
52