Completed
Push — master ( 8478f2...62fdbf )
by Manel
02:10
created

EnrollmentTransformer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 21
ccs 0
cts 9
cp 0
rs 10

1 Method

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