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

Item::transform()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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