Completed
Push — master ( ab9b64...d071e5 )
by Manu
02:02
created

InventoryTransformer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 18
rs 10

1 Method

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