Completed
Push — development ( b626b0...ff940a )
by Thomas
16s
created

GlobalContext::getDefaultLocale()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Oc\GlobalContext;
4
5
/**
6
 * Class GlobalContext
7
 */
8
class GlobalContext
9
{
10
    /**
11
     * @var string
12
     */
13
    private $locale;
14
15
    /**
16
     * @var string
17
     */
18
    private $defaultLocale;
19
20
    /**
21
     * GlobalContext constructor.
22
     *
23
     * @param string $defaultLocale
24
     * @param string $locale
25
     */
26
    public function __construct($defaultLocale, $locale)
27
    {
28
        $this->defaultLocale = $defaultLocale;
29
        $this->locale = $locale;
30
    }
31
32
    /**
33
     * Returns the default locale of the application.
34
     *
35
     * @return string
36
     */
37
    public function getDefaultLocale()
38
    {
39
        return $this->defaultLocale;
40
    }
41
42
    /**
43
     * Returns the global locale of the application.
44
     *
45
     * @return string
46
     */
47
    public function getLocale()
48
    {
49
        return $this->locale;
50
    }
51
}
52