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

GlobalContext   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 44
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getDefaultLocale() 0 4 1
A getLocale() 0 4 1
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