Completed
Pull Request — development (#546)
by Nick
06:41
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
 */
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