TaskTransformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

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