CourseTransformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
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 Scool\EnrollmentMobile\Transformers;
4
5
use League\Fractal\TransformerAbstract;
6
use Scool\EnrollmentMobile\Models\Course;
7
8
/**
9
 * Class CourseTransformer
10
 * @package namespace Scool\EnrollmentMobile\Transformers;
11
 */
12
class CourseTransformer extends TransformerAbstract
13
{
14
15
    /**
16
     * Transform the \Course entity
17
     * @param \Course $model
18
     *
19
     * @return array
20
     */
21
    public function transform(Course $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