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

InventoryTransformer::transform()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 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
}