SettingDataTransformer::transform()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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