ComposerJsonFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
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\Composer\ComposerJson;
24
use Tenside\Core\Util\HomePathDeterminator;
25
26
/**
27
 * This class creates a composerJson instance.
28
 *
29
 * @internal
30
 */
31
class ComposerJsonFactory
32
{
33
    /**
34
     * Create an instance.
35
     *
36
     * @param HomePathDeterminator $home The home determinator.
37
     *
38
     * @return ComposerJson
39
     */
40
    public static function create(HomePathDeterminator $home)
41
    {
42
        return new ComposerJson($home->homeDir() . DIRECTORY_SEPARATOR . 'composer.json');
43
    }
44
}
45