TaskTransformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

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