Item::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 9
cp 0
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 3
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
use Flipbox\Transform\Scope;
13
14
/**
15
 * @author Flipbox Factory <[email protected]>
16
 * @since 3.0.0
17
 */
18
class Item extends AbstractResource
19
{
20
    /**
21
     * @inheritdoc
22
     */
23
    public function __invoke(Scope $scope, string $identifier = null, ...$params)
24
    {
25
        $childScope = $scope->childScope($identifier);
26
27
        return $childScope->transform(
28
            $this->transformer,
29
            $this->data,
30
            $params
31
        );
32
    }
33
}
34