vragovR/safecrow-api

View on GitHub
src/DataTransformer/SettingDataTransformer.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
namespace SafeCrow\DataTransformer;

use SafeCrow\Model\Setting;

/**
 * Class SettingDataTransformer
 * @package SafeCrow\DataTransformer
 */
class SettingDataTransformer implements DataTransformerInterface
{
    /**
     * @param array $value
     * @return Setting
     */
    public function transform(array $value) : Setting
    {
        $setting = new Setting();
        $setting
            ->setCallbackUrl($value['callback_url']);

        return $setting;
    }
}