Completed
Pull Request — development (#546)
by Nick
07:54 queued 01:05
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
 * @author Nick Lubisch <[email protected]>
10
 */
11
class GlobalContext
12
{
13
    /**
14
     * @var string
15
     */
16
    private $locale;
17
18
    /**
19
     * GlobalContext constructor.
20
     *
21
     * @param string $locale
22
     */
23
    public function __construct($locale)
24
    {
25
        $this->locale = $locale;
26
    }
27
28
    /**
29
     * Returns the global locale of the application.
30
     *
31
     * @return string
32
     */
33
    public function getLocale()
34
    {
35
        return $this->locale;
36
    }
37
}
38