Transformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 9
ccs 0
cts 2
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A transformCollection() 0 4 1
transform() 0 1 ?
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: adam
5
 * Date: 20/04/16
6
 * Time: 16:49.
7
 */
8
9
namespace App\Transformers;
10
11
abstract class Transformer
12
{
13
    public function transformCollection(array $items)
14
    {
15
        return array_map([$this, 'transform'], $items);
16
    }
17
18
    abstract public function transform($item);
19
}
20