TaskTransformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
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 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 9 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: mark
5
 * Date: 01/12/15
6
 * Time: 21:55
7
 */
8
9
class TaskTransformer extends Transformer{
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
10
11
    public function transform($task){
12
        return [
13
            'id' => $task['id'],
14
            'name' => $task['name'],
15
            'priority' => $task['priority'],
16
            'done' => $task['done'],
17
        ];
18
19
    }
20
21
}