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

Item::transform()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 2
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\resources;
12
13
/**
14
 * @package flipbox\transform\resources
15
 * @author Flipbox Factory <[email protected]>
16
 * @since 1.0.0
17
 */
18
class Item extends AbstractResource
19
{
20
21
    /**
22
     * @param callable $transformer
23
     * @param $data
24
     * @return array|null
25
     */
26
    public function transform(callable $transformer, $data)
27
    {
28
        return $this->scope->transform(
29
            $transformer,
30
            $data
31
        );
32
    }
33
34
}
35