Passed
Push β€” develop ( 7baf3c...358903 )
by Fu
15:16 queued 10:25
created

TransformerAbstract::parseExcludeFields()   A

Complexity

Conditions 5
Paths 7

Size

Total Lines 15
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 5
eloc 10
nc 7
nop 0
dl 0
loc 15
rs 9.6111
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: frowhy
5
 * Date: 2017/12/6
6
 * Time: 上午10:30.
7
 */
8
9
namespace Modules\Core\Abstracts;
10
11
12
use League\Fractal\TransformerAbstract as BaseTransformerAbstract;
13
14
abstract class TransformerAbstract extends BaseTransformerAbstract
15
{
16
    protected $transform;
17
    protected $field;
18
    protected $filter;
19
20
    abstract public function fields($attribute);
21
22
    public function transform($transform)
23
    {
24
        $this->transform = $transform;
25
        $this->field = $this->fields($transform);
26
27
        return $this->field;
28
    }
29
}
30