<?php
declare(strict_types=1);
namespace Slivki\Response\FoodCourt\Category;
final class CategoryResponse implements \JsonSerializable
{
private int $id;
private int $count;
private string $name;
public function __construct(
int $id,
int $count,
string $name
) {
$this->id = $id;
$this->count = $count;
$this->name = $name;
}
public function jsonSerialize(): array
{
return [
'id' => $this->id,
'name' => $this->name,
'count' => $this->count,
];
}
}