Locale   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 10 1
1
<?php
2
3
/**
4
 * @author Jared King <[email protected]>
5
 *
6
 * @link http://jaredtking.com
7
 *
8
 * @copyright 2015 Jared King
9
 * @license MIT
10
 */
11
namespace Infuse\Services;
12
13
class Locale
14
{
15
    public function __invoke($app)
16
    {
17
        $config = $app['config'];
18
        $assetsDir = $config->get('dirs.assets');
19
20
        $locale = new \Infuse\Locale($config->get('i18n.locale'));
21
        $locale->setLocaleDataDir("$assetsDir/locales");
22
23
        return $locale;
24
    }
25
}
26