Completed
Push — master ( 911991...0a9dc2 )
by Yves
07:41
created

TaskTransformer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 9 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: yves
5
 * Date: 25/05/16
6
 * Time: 11:19
7
 */
8
9
namespace Acme\Transformers;
10
11
class TaskTransformer extends Transformer
12
{
13
    public function transform($task)
14
    {
15
16
        return [
17
            'name' => $task['name'],
18
            'some_bool' => (boolean) $task['done'],
19
            'priority' => (int)$task['priority'],
20
        ];
21
    }
22
}