TensideJsonConfigFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of tenside/core-bundle.
5
 *
6
 * (c) Christian Schiffler <[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
 * This project is provided in good faith and hope to be usable by anyone.
12
 *
13
 * @package    tenside/core-bundle
14
 * @author     Christian Schiffler <[email protected]>
15
 * @copyright  2015 Christian Schiffler <[email protected]>
16
 * @license    https://github.com/tenside/core-bundle/blob/master/LICENSE MIT
17
 * @link       https://github.com/tenside/core-bundle
18
 * @filesource
19
 */
20
21
namespace Tenside\CoreBundle\DependencyInjection\Factory;
22
23
use Tenside\Core\Config\TensideJsonConfig;
24
use Tenside\Core\Util\HomePathDeterminator;
25
use Tenside\Core\Util\JsonFile;
26
27
/**
28
 * This class creates a config instance.
29
 *
30
 * @internal
31
 */
32
class TensideJsonConfigFactory
33
{
34
    /**
35
     * Create an instance.
36
     *
37
     * @param HomePathDeterminator $home The home determinator.
38
     *
39
     * @return TensideJsonConfig
40
     */
41
    public static function create(HomePathDeterminator $home)
42
    {
43
        return new TensideJsonConfig(new JsonFile($home->tensideDataDir() . DIRECTORY_SEPARATOR . 'tenside.json'));
44
    }
45
}
46