GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

LocaleHelper   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 54
c 0
b 0
f 0
ccs 10
cts 10
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getDefaultLocale() 0 4 1
A getLocales() 0 4 1
A getLocalePrefix() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Tadcka package.
5
 *
6
 * (c) Tadas Gliaubicas <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Tadcka\Component\Routing\Helper;
13
14
/**
15
 * @author Tadas Gliaubicas <[email protected]>
16
 *
17
 * @since 9/1/14 8:30 PM
18
 */
19
class LocaleHelper
20
{
21
    /**
22
     * @var string
23
     */
24
    private $defaultLocale;
25
26
    /**
27
     * @var array
28
     */
29
    private $locales;
30
31
    /**
32
     * Constructor.
33
     *
34
     * @param string $defaultLocale
35
     * @param array $locales
36
     */
37 3
    public function __construct($defaultLocale, array $locales)
38
    {
39 3
        $this->defaultLocale = $defaultLocale;
40 3
        $this->locales = $locales;
41 3
    }
42
43
    /**
44
     * Get default locale.
45
     *
46
     * @return string
47
     */
48 1
    public function getDefaultLocale()
49
    {
50 1
        return $this->defaultLocale;
51
    }
52
53
    /**
54
     * Get locales.
55
     *
56
     * @return array
57
     */
58 1
    public function getLocales()
59
    {
60 1
        return $this->locales;
61
    }
62
63
    /**
64
     * Get locale prefix.
65
     *
66
     * @return string
67
     */
68 1
    public function getLocalePrefix()
69
    {
70 1
        return '/{_locale}';
71
    }
72
}
73