Files
scribe/tests/Fixtures/TestTransformer.php
Tobias van Beek 6b1c502758 Adddocblockhandling (#192)
* Add the handling for a @transformer @transformercollection or @result tag in the method docblock

* Update the readme to document the @transform, @transformercollection and @response tag

* Fix the styleci issues

* Apply patch form styleci

* Add a transformermodel tag and support PHP 5

* Fix the version without a modeltag

* Always use the transformermodel tag and a codestyle issue
2017-05-29 17:14:38 +02:00

28 lines
527 B
PHP

<?php
namespace Mpociot\ApiDoc\Tests\Fixtures;
use League\Fractal\TransformerAbstract;
/**
* A test transformer to show the functions.
*
* @author Tobias van Beek <t.vanbeek@tjvb.nl>
*/
class TestTransformer extends TransformerAbstract
{
/**
* A Fractal transformer.
*
* @return array
*/
public function transform(TestModel $model)
{
return [
'id' => $model->id,
'description' => $model->description,
'name' => $model->name,
];
}
}