Completed
Push — master ( 9a1097...9d1cce )
by Nate
04:06
created

Factory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 28
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A collection() 0 8 1
A item() 0 8 1
1
<?php
2
3
/**
4
 * @author    Flipbox Factory
5
 * @copyright Copyright (c) 2017, Flipbox Digital
6
 * @link      https://github.com/flipbox/transform/releases/latest
7
 * @license   https://github.com/flipbox/transform/blob/master/LICENSE
8
 */
9
10
namespace Flipbox\Transform;
11
12
use Flipbox\Transform\Resources\Collection;
13
use Flipbox\Transform\Resources\Item;
14
15
/**
16
 * @author Flipbox Factory <[email protected]>
17
 * @since 1.0.0
18
 */
19
class Factory
20
{
21
    /**
22
     * @param array $config
23
     * @return Collection
24
     */
25
    public static function collection(array $config = []): Collection
26
    {
27
        return new Collection(
28
            new Scope(
29
                new Transform($config)
30
            )
31
        );
32
    }
33
34
    /**
35
     * @param array $config
36
     * @return Item
37
     */
38
    public static function item(array $config = []): Item
39
    {
40
        return new Item(
41
            new Scope(
42
                new Transform($config)
43
            )
44
        );
45
    }
46
}
47