1<?php
2
3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
4// See the LICENCE file in the repository root for full licence text.
5
6namespace App\Transformers;
7
8use App\Models\BuildPropagationHistory;
9
10class BuildHistoryChartTransformer extends TransformerAbstract
11{
12 public function transform(BuildPropagationHistory $entry)
13 {
14 // $entry is output of ::changelog.
15 return [
16 'created_at' => json_time($entry->created_at),
17 'user_count' => $entry->user_count,
18 'label' => $entry->label,
19 ];
20 }
21}