Completed
Push — master ( 198b3f...28f717 )
by Nate
02:18
created

Factory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 31
rs 10
c 0
b 0
f 0

2 Methods

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