Laravel AT Protocol Client (alpha & unstable)
1<?php
2
3namespace SocialDept\AtpClient\Data\Responses\Atproto\Repo;
4
5use Illuminate\Contracts\Support\Arrayable;
6use SocialDept\AtpSchema\Generated\Com\Atproto\Repo\Defs\CommitMeta;
7
8/**
9 * @implements Arrayable<string, mixed>
10 */
11class DeleteRecordResponse implements Arrayable
12{
13 public function __construct(
14 public readonly ?CommitMeta $commit = null,
15 ) {}
16
17 public static function fromArray(array $data): self
18 {
19 return new self(
20 commit: isset($data['commit']) ? CommitMeta::fromArray($data['commit']) : null,
21 );
22 }
23
24 public function toArray(): array
25 {
26 return [
27 'commit' => $this->commit?->toArray(),
28 ];
29 }
30}