Passed
Push — master ( 196627...aba9bd )
by Sander
02:07
created

RepositoryFactory::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the composer-link plugin.
7
 *
8
 * Copyright (c) 2021-2022 Sander Visser <[email protected]>.
9
 *
10
 * For the full copyright and license information, please view the LICENSE.md
11
 * file that was distributed with this source code.
12
 *
13
 * @link https://github.com/SanderSander/composer-link
14
 */
15
16
namespace ComposerLink\Repository;
17
18
class RepositoryFactory
19
{
20
    public function create(string $storageFile): Repository
21
    {
22
        return new Repository(
23
            new JsonStorage($storageFile),
24
            new Transformer()
25
        );
26
    }
27
}
28