You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
dto2data/tests/unit/Converter/fixtures/FillTest/Transformer/ClassDataTransformer.php

25 lines
587 B

<?php
namespace Rinsvent\DTO2Data\Tests\unit\Converter\fixtures\FillTest\Transformer;
use Rinsvent\Transformer\Transformer\Meta;
use Rinsvent\Transformer\Transformer\TransformerInterface;
class ClassDataTransformer implements TransformerInterface
{
/**
* @param array|null $data
* @param ClassData $meta
*/
public function transform(mixed $data, Meta $meta): mixed
{
if ($data === null) {
return $data;
}
if (isset($data['surname'])) {
$data['surname'] = '123454321';
}
return $data;
}
}