Transformer::transformData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 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