Move CachetHq to folder

This commit is contained in:
James Brooks
2014-12-20 21:16:00 +00:00
parent 63ff951d88
commit a982edeb63
21 changed files with 0 additions and 0 deletions
@@ -0,0 +1,22 @@
<?php
namespace CachetHQ\Cachet\Transformers;
use Metric;
use League\Fractal\TransformerAbstract;
class MetricTransformer extends TransformerAbstract {
public function transform(Metric $metric) {
return [
'id' => (int) $metric->id,
'name' => $metric->name,
'description' => $metric->description,
'suffix' => $metric->suffix,
'display' => $metric->shouldDisplay,
'created_at' => $metric->created_at->timestamp,
'updated_at' => $metric->updated_at->timestamp,
];
}
}