InventoryTransformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 1
c 2
b 1
f 1
lcom 0
cbo 0
dl 0
loc 19
rs 10
ccs 0
cts 9
cp 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 9 1
1
<?php
2
3
namespace Scool\Inventory\Transformers;
4
5
use League\Fractal\TransformerAbstract;
6
7
/**
8
 * Class InventoryTransformer.
9
 */
10
class InventoryTransformer extends TransformerAbstract
11
{
12
    /**
13
     * Transform the \Inventory entity.
14
     *
15
     * @param \Inventory $model
16
     *
17
     * @return array
18
     */
19
    public function transform(Inventory $model)
20
    {
21
        return [
22
            'id'         => (int) $model->id,
23
            /* place your other model properties here */
24
            'created_at' => $model->created_at,
25
            'updated_at' => $model->updated_at,
26
        ];
27
    }
28
}
29