Transformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 4
Bugs 3 Features 0
Metric Value
wmc 1
c 4
b 3
f 0
lcom 0
cbo 0
dl 0
loc 23
ccs 3
cts 3
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
transform() 0 1 ?
A transformData() 0 4 1
1
<?php
2
3
namespace Raidros\Storer;
4
5
abstract class Transformer
6
{
7
    /**
8
     * Base method to transform response data.
9
     *
10
     * @param array $data
11
     *
12
     * @return array
13
     */
14
    abstract protected function transform(array $data);
15
16
    /**
17
     * Call the transform method and check the return.
18
     *
19
     * @param array $data
20
     *
21
     * @return array
22
     */
23 6
    public function transformData(array $data)
24
    {
25 6
        return $this->transform($data);
26 1
    }
27
}
28