Completed
Pull Request — development (#546)
by Nick
06:21
created

GlobalContext::__construct()   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 1
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
 * @package Oc\GlobalContext
9
 */
10
class GlobalContext
11
{
12
    /**
13
     * @var string
14
     */
15
    private $locale;
16
17
    /**
18
     * GlobalContext constructor.
19
     *
20
     * @param string $locale
21
     */
22
    public function __construct($locale)
23
    {
24
        $this->locale = $locale;
25
    }
26
27
    /**
28
     * Returns the global locale of the application.
29
     *
30
     * @return string
31
     */
32
    public function getLocale()
33
    {
34
        return $this->locale;
35
    }
36
}
37