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

GlobalContext   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

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