Something went wrong. Try again.
Parse and validate AT Protocol Lexicons with DTO generation for Laravel
Something went wrong. Try again.
1.4 kB · 54 lines
PHP
at dev
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455<?php
namespace SocialDept\AtpSchema\Generated\Tools\Ozone\Moderation\Defs;
use SocialDept\AtpSchema\Data\Data;
/** * GENERATED CODE - DO NOT EDIT * * Mute incoming reports from an account * * Lexicon: tools.ozone.moderation.defs.modEventMuteReporter * Type: object * * @property string|null $comment * @property int|null $durationInHours Indicates how long the account should remain muted. Falsy value here means a permanent mute. */class ModEventMuteReporter extends Data{ /** * @param int|null $durationInHours Indicates how long the account should remain muted. Falsy value here means a permanent mute. */ public function __construct( public readonly ?string $comment = null, public readonly ?int $durationInHours = null ) { }
/** * Get the lexicon NSID for this data type. * * @return string */ public static function getLexicon(): string { return 'tools.ozone.moderation.defs.modEventMuteReporter'; }
/** * Create an instance from an array. * * @param array $data The data array * @return static */ public static function fromArray(array $data): static { return new static( comment: $data['comment'] ?? null, durationInHours: $data['durationInHours'] ?? null ); }
}