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

Factory::collection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 8
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 2
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