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

Factory::getParams()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 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