SettingDataTransformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 8 1
1
<?php
2
namespace SafeCrow\DataTransformer;
3
4
use SafeCrow\Model\Setting;
5
6
/**
7
 * Class SettingDataTransformer
8
 * @package SafeCrow\DataTransformer
9
 */
10
class SettingDataTransformer implements DataTransformerInterface
11
{
12
    /**
13
     * @param array $value
14
     * @return Setting
15
     */
16
    public function transform(array $value) : Setting
17
    {
18
        $setting = new Setting();
19
        $setting
20
            ->setCallbackUrl($value['callback_url']);
21
22
        return $setting;
23
    }
24
}
25