mirror of
https://github.com/ambieco/scribe.git
synced 2026-04-02 18:17:23 +08:00
* 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
28 lines
527 B
PHP
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,
|
|
];
|
|
}
|
|
}
|