Add type hints in Mastodon\Instance

This commit is contained in:
Hypolite Petovan 2025-01-27 22:01:17 -05:00
parent 258476e14f
commit e4fa1aa418

View file

@ -24,40 +24,24 @@ use Friendica\Object\Api\Mastodon\InstanceV2\Configuration;
*/ */
class Instance extends BaseDataTransferObject class Instance extends BaseDataTransferObject
{ {
/** @var string (URL) */ protected string $uri;
protected $uri; protected string $title;
/** @var string */ protected string $short_description;
protected $title; protected string $description;
/** @var string */ protected string $email;
protected $short_description; protected string $version;
/** @var string */ protected array $urls;
protected $description; protected Stats $stats;
/** @var string */ /** This is meant as a server banner, default Mastodon "thumbnail" is 1600×620px */
protected $email; protected ?string $thumbnail = null;
/** @var string */ protected array $languages;
protected $version; protected int $max_toot_chars;
/** @var array */ protected bool $registrations;
protected $urls; protected bool $approval_required;
/** @var Stats */ protected bool $invites_enabled;
protected $stats; protected Configuration $configuration;
/** @var string|null This is meant as a server banner, default Mastodon "thumbnail" is 1600×620px */ protected ?Account $contact_account = null;
protected $thumbnail = null; protected array $rules = [];
/** @var array */
protected $languages;
/** @var int */
protected $max_toot_chars;
/** @var bool */
protected $registrations;
/** @var bool */
protected $approval_required;
/** @var bool */
protected $invites_enabled;
/** @var Configuration */
protected $configuration;
/** @var Account|null */
protected $contact_account = null;
/** @var array */
protected $rules = [];
public function __construct(IManageConfigValues $config, BaseURL $baseUrl, Database $database, Configuration $configuration, ?Account $contact_account, array $rules) public function __construct(IManageConfigValues $config, BaseURL $baseUrl, Database $database, Configuration $configuration, ?Account $contact_account, array $rules)
{ {