[AUTOGENERATED] Update autogenerated code

This commit is contained in:
Hugo Sales 2021-12-26 21:32:09 +00:00 committed by Diogo Peralta Cordeiro
parent 0df423e84b
commit 93276ce8d0
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0
35 changed files with 131 additions and 131 deletions

View File

@ -60,12 +60,12 @@ class Attachment extends Entity
// @codeCoverageIgnoreStart
private int $id;
private int $lives = 1;
private ?string $filehash;
private ?string $mimetype;
private ?string $filename;
private ?int $size;
private ?int $width;
private ?int $height;
private ?string $filehash = null;
private ?string $mimetype = null;
private ?string $filename = null;
private ?int $size = null;
private ?int $width = null;
private ?int $height = null;
private DateTimeInterface $modified;
public function setId(int $id): self
@ -92,7 +92,7 @@ class Attachment extends Entity
public function setFilehash(?string $filehash): self
{
$this->filehash = mb_substr($filehash, 0, 64);
$this->filehash = \is_null($filehash) ? null : mb_substr($filehash, 0, 64);
return $this;
}
@ -103,7 +103,7 @@ class Attachment extends Entity
public function setMimetype(?string $mimetype): self
{
$this->mimetype = mb_substr($mimetype, 0, 255);
$this->mimetype = \is_null($mimetype) ? null : mb_substr($mimetype, 0, 255);
return $this;
}
@ -114,7 +114,7 @@ class Attachment extends Entity
public function setFilename(?string $filename): self
{
$this->filename = mb_substr($filename, 0, 191);
$this->filename = \is_null($filename) ? null : mb_substr($filename, 0, 191);
return $this;
}

View File

@ -69,7 +69,7 @@ class AttachmentThumbnail extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $attachment_id;
private ?string $mimetype;
private ?string $mimetype = null;
private int $size = 0;
private string $filename;
private int $width;
@ -89,7 +89,7 @@ class AttachmentThumbnail extends Entity
public function setMimetype(?string $mimetype): self
{
$this->mimetype = mb_substr($mimetype, 0, 129);
$this->mimetype = \is_null($mimetype) ? null : mb_substr($mimetype, 0, 129);
return $this;
}

View File

@ -45,7 +45,7 @@ class AttachmentToNote extends Entity
// @codeCoverageIgnoreStart
private int $attachment_id;
private int $note_id;
private ?string $title;
private ?string $title = null;
private DateTimeInterface $modified;
public function setAttachmentId(int $attachment_id): self

View File

@ -51,7 +51,7 @@ class Avatar extends Entity
// @codeCoverageIgnoreStart
private int $actor_id;
private int $attachment_id;
private ?string $title;
private ?string $title = null;
private DateTimeInterface $created;
private DateTimeInterface $modified;
@ -79,7 +79,7 @@ class Avatar extends Entity
public function setTitle(?string $title): self
{
$this->title = mb_substr($title, 0, 191);
$this->title = \is_null($title) ? null : mb_substr($title, 0, 191);
return $this;
}

View File

@ -44,12 +44,12 @@ class ForeignLink
private int $user_id;
private int $foreign_id;
private int $service;
private ?string $credentials;
private ?string $credentials = null;
private int $noticesync = 1;
private int $friendsync = 2;
private int $profilesync = 1;
private ?DateTimeInterface $last_noticesync;
private ?DateTimeInterface $last_friendsync;
private ?DateTimeInterface $last_noticesync = null;
private ?DateTimeInterface $last_friendsync = null;
private DateTimeInterface $created;
private DateTimeInterface $modified;
@ -88,7 +88,7 @@ class ForeignLink
public function setCredentials(?string $credentials): self
{
$this->credentials = mb_substr($credentials, 0, 191);
$this->credentials = \is_null($credentials) ? null : mb_substr($credentials, 0, 191);
return $this;
}

View File

@ -43,7 +43,7 @@ class ForeignService
// @codeCoverageIgnoreStart
private int $id;
private string $name;
private ?string $description;
private ?string $description = null;
private DateTimeInterface $created;
private DateTimeInterface $modified;
@ -71,7 +71,7 @@ class ForeignService
public function setDescription(?string $description): self
{
$this->description = mb_substr($description, 0, 191);
$this->description = \is_null($description) ? null : mb_substr($description, 0, 191);
return $this;
}

View File

@ -44,7 +44,7 @@ class ForeignUser
private int $id;
private int $service;
private string $uri;
private ?string $nickname;
private ?string $nickname = null;
private DateTimeInterface $created;
private DateTimeInterface $modified;
@ -83,7 +83,7 @@ class ForeignUser
public function setNickname(?string $nickname): self
{
$this->nickname = mb_substr($nickname, 0, 191);
$this->nickname = \is_null($nickname) ? null : mb_substr($nickname, 0, 191);
return $this;
}

View File

@ -49,7 +49,7 @@ class FreeNetworkActorProtocol extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $actor_id;
private ?string $protocol;
private ?string $protocol = null;
private string $addr;
private DateTimeInterface $created;
private DateTimeInterface $modified;
@ -67,7 +67,7 @@ class FreeNetworkActorProtocol extends Entity
public function setProtocol(?string $protocol): self
{
$this->protocol = mb_substr($protocol, 0, 32);
$this->protocol = \is_null($protocol) ? null : mb_substr($protocol, 0, 32);
return $this;
}

View File

@ -48,9 +48,9 @@ class Language extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $id;
private ?string $locale;
private ?string $long_display;
private ?string $short_display;
private ?string $locale = null;
private ?string $long_display = null;
private ?string $short_display = null;
private DateTimeInterface $created;
public function setId(int $id): self
@ -66,7 +66,7 @@ class Language extends Entity
public function setLocale(?string $locale): self
{
$this->locale = mb_substr($locale, 0, 64);
$this->locale = \is_null($locale) ? null : mb_substr($locale, 0, 64);
return $this;
}
@ -77,7 +77,7 @@ class Language extends Entity
public function setLongDisplay(?string $long_display): self
{
$this->long_display = mb_substr($long_display, 0, 64);
$this->long_display = \is_null($long_display) ? null : mb_substr($long_display, 0, 64);
return $this;
}
@ -88,7 +88,7 @@ class Language extends Entity
public function setShortDisplay(?string $short_display): self
{
$this->short_display = mb_substr($short_display, 0, 12);
$this->short_display = \is_null($short_display) ? null : mb_substr($short_display, 0, 12);
return $this;
}

View File

@ -49,9 +49,9 @@ class Link extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $id;
private ?string $url;
private ?string $url_hash;
private ?string $mimetype;
private ?string $url = null;
private ?string $url_hash = null;
private ?string $mimetype = null;
private DateTimeInterface $modified;
public function setId(int $id): self
@ -78,7 +78,7 @@ class Link extends Entity
public function setUrlHash(?string $url_hash): self
{
$this->url_hash = mb_substr($url_hash, 0, 64);
$this->url_hash = \is_null($url_hash) ? null : mb_substr($url_hash, 0, 64);
return $this;
}
@ -89,7 +89,7 @@ class Link extends Entity
public function setMimetype(?string $mimetype): self
{
$this->mimetype = mb_substr($mimetype, 0, 50);
$this->mimetype = \is_null($mimetype) ? null : mb_substr($mimetype, 0, 50);
return $this;
}

View File

@ -47,7 +47,7 @@ class Notification extends Entity
// @codeCoverageIgnoreStart
private int $activity_id;
private int $target_id;
private ?string $reason;
private ?string $reason = null;
private DateTimeInterface $created;
private DateTimeInterface $modified;
@ -75,7 +75,7 @@ class Notification extends Entity
public function setReason(?string $reason): self
{
$this->reason = mb_substr($reason, 0, 191);
$this->reason = \is_null($reason) ? null : mb_substr($reason, 0, 191);
return $this;
}

View File

@ -40,7 +40,7 @@ class UserNotificationPrefs extends Entity
// @codeCoverageIgnoreStart
private int $user_id;
private string $transport;
private ?int $target_actor_id;
private ?int $target_actor_id = null;
private bool $activity_by_subscribed = true;
private bool $mention = true;
private bool $reply = true;
@ -49,7 +49,7 @@ class UserNotificationPrefs extends Entity
private bool $nudge = false;
private bool $dm = true;
private bool $post_on_status_change = false;
private ?bool $enable_posting;
private ?bool $enable_posting = true;
private DateTimeInterface $created;
private DateTimeInterface $modified;

View File

@ -57,8 +57,8 @@ class ActivitypubActor extends Entity
private string $uri;
private int $actor_id;
private string $inbox_uri;
private ?string $inbox_shared_uri;
private ?string $url;
private ?string $inbox_shared_uri = null;
private ?string $url = null;
private DateTimeInterface $created;
private DateTimeInterface $modified;

View File

@ -50,7 +50,7 @@ class ActivitypubRsa extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $actor_id;
private ?string $private_key;
private ?string $private_key = null;
private string $public_key;
private DateTimeInterface $created;
private DateTimeInterface $modified;

View File

@ -12,7 +12,7 @@ class Collection extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $id;
private ?string $name;
private ?string $name = null;
private int $actor_id;
public function setId(int $id): self
@ -28,7 +28,7 @@ class Collection extends Entity
public function setName(?string $name): self
{
$this->name = mb_substr($name, 0, 255);
$this->name = \is_null($name) ? null : mb_substr($name, 0, 255);
return $this;
}

View File

@ -52,13 +52,13 @@ class AttachmentEmbed extends Entity
// @codeCoverageIgnoreStart
private int $link_id;
private int $attachment_id;
private ?string $provider_name;
private ?string $provider_url;
private ?string $title;
private ?string $description;
private ?string $author_name;
private ?string $author_url;
private ?string $thumbnail_url;
private ?string $provider_name = null;
private ?string $provider_url = null;
private ?string $title = null;
private ?string $description = null;
private ?string $author_name = null;
private ?string $author_url = null;
private ?string $thumbnail_url = null;
private DateTimeInterface $modified;
public function setLinkId(int $link_id): self

View File

@ -41,16 +41,16 @@ class Oomox extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $actor_id;
private ?string $colour_foreground_light;
private ?string $colour_background_hard_light;
private ?string $colour_background_card_light;
private ?string $colour_border_light;
private ?string $colour_accent_light;
private ?string $colour_foreground_dark;
private ?string $colour_background_hard_dark;
private ?string $colour_background_card_dark;
private ?string $colour_border_dark;
private ?string $colour_accent_dark;
private ?string $colour_foreground_light = null;
private ?string $colour_background_hard_light = null;
private ?string $colour_background_card_light = null;
private ?string $colour_border_light = null;
private ?string $colour_accent_light = null;
private ?string $colour_foreground_dark = null;
private ?string $colour_background_hard_dark = null;
private ?string $colour_background_card_dark = null;
private ?string $colour_border_dark = null;
private ?string $colour_accent_dark = null;
private DateTimeInterface $created;
private DateTimeInterface $modified;

View File

@ -42,11 +42,11 @@ class Poll extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $id;
private ?string $uri;
private ?int $actor_id;
private ?string $uri = null;
private ?int $actor_id = null;
private int $note_id;
private ?string $question;
private ?string $options;
private ?string $question = null;
private ?string $options = null;
private DateTimeInterface $created;
private DateTimeInterface $modified;
@ -63,7 +63,7 @@ class Poll extends Entity
public function setUri(?string $uri): self
{
$this->uri = mb_substr($uri, 0, 191);
$this->uri = \is_null($uri) ? null : mb_substr($uri, 0, 191);
return $this;
}

View File

@ -42,10 +42,10 @@ class PollResponse extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $id;
private ?string $uri;
private ?string $uri = null;
private int $poll_id;
private ?int $actor_id;
private ?int $selection;
private ?int $actor_id = null;
private ?int $selection = null;
private DateTimeInterface $created;
private DateTimeInterface $modified;
@ -62,7 +62,7 @@ class PollResponse extends Entity
public function setUri(?string $uri): self
{
$this->uri = mb_substr($uri, 0, 191);
$this->uri = \is_null($uri) ? null : mb_substr($uri, 0, 191);
return $this;
}

View File

@ -41,8 +41,8 @@ class ProfileColor extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $actor_id;
private ?string $background;
private ?string $color;
private ?string $background = null;
private ?string $color = null;
private DateTimeInterface $created;
private DateTimeInterface $modified;

View File

@ -49,7 +49,7 @@ class Activity extends Entity
private string $verb;
private string $object_type;
private int $object_id;
private ?string $source;
private ?string $source = null;
private \DateTimeInterface $created;
public function setId(int $id): self
@ -109,7 +109,7 @@ class Activity extends Entity
public function setSource(?string $source): self
{
$this->source = \mb_substr($source, 0, 32);
$this->source = \is_null($source) ? null : \mb_substr($source, 0, 32);
return $this;
}

View File

@ -48,12 +48,12 @@ class ActorCircle extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $id;
private ?int $tagger;
private ?int $tagger = null;
private int $tagged;
private string $tag;
private bool $use_canonical;
private ?string $description;
private ?bool $private;
private ?string $description = null;
private ?bool $private = false;
private \DateTimeInterface $created;
private \DateTimeInterface $modified;

View File

@ -41,11 +41,11 @@ class ConfirmAddress extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private string $code;
private ?int $user_id;
private ?int $user_id = 0;
private string $address;
private ?string $address_extra;
private ?string $address_extra = null;
private string $address_type;
private ?\DateTimeInterface $claimed;
private ?\DateTimeInterface $claimed = null;
private \DateTimeInterface $sent;
private \DateTimeInterface $modified;
@ -84,7 +84,7 @@ class ConfirmAddress extends Entity
public function setAddressExtra(?string $address_extra): self
{
$this->address_extra = \mb_substr($address_extra, 0, 191);
$this->address_extra = \is_null($address_extra) ? null : \mb_substr($address_extra, 0, 191);
return $this;
}

View File

@ -44,8 +44,8 @@ class GroupMember extends Entity
// @codeCoverageIgnoreStart
private int $group_id;
private int $actor_id;
private ?bool $is_admin;
private ?string $uri;
private ?bool $is_admin = false;
private ?string $uri = null;
private \DateTimeInterface $created;
private \DateTimeInterface $modified;
@ -84,7 +84,7 @@ class GroupMember extends Entity
public function setUri(?string $uri): self
{
$this->uri = \mb_substr($uri, 0, 191);
$this->uri = \is_null($uri) ? null : \mb_substr($uri, 0, 191);
return $this;
}

View File

@ -44,7 +44,7 @@ class Invitation extends Entity
private int $user_id;
private string $address;
private string $address_type;
private ?int $registered_user_id;
private ?int $registered_user_id = null;
private \DateTimeInterface $created;
public function setCode(string $code): self

View File

@ -43,7 +43,7 @@ class LocalGroup extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $group_id;
private ?string $nickname;
private ?string $nickname = null;
private \DateTimeInterface $created;
private \DateTimeInterface $modified;
@ -60,7 +60,7 @@ class LocalGroup extends Entity
public function setNickname(?string $nickname): self
{
$this->nickname = \mb_substr($nickname, 0, 64);
$this->nickname = \is_null($nickname) ? null : \mb_substr($nickname, 0, 64);
return $this;
}

View File

@ -60,17 +60,17 @@ class LocalUser extends Entity implements UserInterface, PasswordAuthenticatedUs
// @codeCoverageIgnoreStart
private int $id;
private string $nickname;
private ?string $password;
private ?string $outgoing_email;
private ?string $incoming_email;
private ?bool $is_email_verified;
private ?string $timezone;
private ?PhoneNumber $phone_number;
private ?int $sms_carrier;
private ?string $sms_email;
private ?bool $auto_subscribe_back;
private ?int $subscription_policy;
private ?bool $is_stream_private;
private ?string $password = null;
private ?string $outgoing_email = null;
private ?string $incoming_email = null;
private ?bool $is_email_verified = false;
private ?string $timezone = null;
private ?PhoneNumber $phone_number = null;
private ?int $sms_carrier = null;
private ?string $sms_email = null;
private ?bool $auto_subscribe_back = false;
private ?int $subscription_policy = 0;
private ?bool $is_stream_private = false;
private \DateTimeInterface $created;
private \DateTimeInterface $modified;
@ -98,7 +98,7 @@ class LocalUser extends Entity implements UserInterface, PasswordAuthenticatedUs
public function setPassword(?string $password): self
{
$this->password = \mb_substr($password, 0, 191);
$this->password = \is_null($password) ? null : \mb_substr($password, 0, 191);
return $this;
}
@ -109,7 +109,7 @@ class LocalUser extends Entity implements UserInterface, PasswordAuthenticatedUs
public function setOutgoingEmail(?string $outgoing_email): self
{
$this->outgoing_email = \mb_substr($outgoing_email, 0, 191);
$this->outgoing_email = \is_null($outgoing_email) ? null : \mb_substr($outgoing_email, 0, 191);
return $this;
}
@ -120,7 +120,7 @@ class LocalUser extends Entity implements UserInterface, PasswordAuthenticatedUs
public function setIncomingEmail(?string $incoming_email): self
{
$this->incoming_email = \mb_substr($incoming_email, 0, 191);
$this->incoming_email = \is_null($incoming_email) ? null : \mb_substr($incoming_email, 0, 191);
return $this;
}
@ -142,7 +142,7 @@ class LocalUser extends Entity implements UserInterface, PasswordAuthenticatedUs
public function setTimezone(?string $timezone): self
{
$this->timezone = \mb_substr($timezone, 0, 50);
$this->timezone = \is_null($timezone) ? null : \mb_substr($timezone, 0, 50);
return $this;
}
@ -175,7 +175,7 @@ class LocalUser extends Entity implements UserInterface, PasswordAuthenticatedUs
public function setSmsEmail(?string $sms_email): self
{
$this->sms_email = \mb_substr($sms_email, 0, 191);
$this->sms_email = \is_null($sms_email) ? null : \mb_substr($sms_email, 0, 191);
return $this;
}

View File

@ -41,7 +41,7 @@ class LocationService extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $id;
private ?string $description;
private ?string $description = null;
private \DateTimeInterface $created;
private \DateTimeInterface $modified;
@ -58,7 +58,7 @@ class LocationService extends Entity
public function setDescription(?string $description): self
{
$this->description = \mb_substr($description, 0, 191);
$this->description = \is_null($description) ? null : \mb_substr($description, 0, 191);
return $this;
}

View File

@ -52,16 +52,16 @@ class Note extends Entity
// @codeCoverageIgnoreStart
private int $id;
private int $actor_id;
private ?string $content;
private ?string $content = null;
private string $content_type = 'text/plain';
private ?string $rendered;
private ?string $rendered = null;
private int $conversation_id;
private ?int $reply_to = null;
private bool $is_local;
private ?string $source;
private ?string $source = null;
private int $scope = 1; //VisibilityScope::EVERYWHERE->value;
private ?string $url;
private ?int $language_id;
private ?string $url = null;
private ?int $language_id = null;
private \DateTimeInterface $created;
private \DateTimeInterface $modified;
@ -155,7 +155,7 @@ class Note extends Entity
public function setSource(?string $source): self
{
$this->source = \mb_substr($source, 0, 32);
$this->source = \is_null($source) ? null : \mb_substr($source, 0, 32);
return $this;
}

View File

@ -41,10 +41,10 @@ class NoteLocation extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $note_id;
private ?float $lat;
private ?float $lon;
private ?int $location_id;
private ?int $location_service;
private ?float $lat = null;
private ?float $lon = null;
private ?int $location_id = null;
private ?int $location_service = null;
private \DateTimeInterface $modified;
public function setNoteId(int $note_id): self

View File

@ -50,7 +50,7 @@ class NoteTag extends Entity
private string $canonical;
private int $note_id;
private bool $use_canonical;
private ?int $language_id;
private ?int $language_id = null;
private \DateTimeInterface $created;
public function setTag(string $tag): self

View File

@ -14,8 +14,8 @@ class ResetPasswordRequest extends Entity implements ResetPasswordRequestInterfa
// @codeCoverageIgnoreStart
private int $id;
private int $user_id;
private ?string $selector;
private ?string $token;
private ?string $selector = null;
private ?string $token = null;
private \DateTimeInterface $expires;
private \DateTimeInterface $created;
@ -43,7 +43,7 @@ class ResetPasswordRequest extends Entity implements ResetPasswordRequestInterfa
public function setSelector(?string $selector): self
{
$this->selector = \mb_substr($selector, 0, 20);
$this->selector = \is_null($selector) ? null : \mb_substr($selector, 0, 20);
return $this;
}
@ -54,7 +54,7 @@ class ResetPasswordRequest extends Entity implements ResetPasswordRequestInterfa
public function setToken(?string $token): self
{
$this->token = \mb_substr($token, 0, 100);
$this->token = \is_null($token) ? null : \mb_substr($token, 0, 100);
return $this;
}

View File

@ -41,7 +41,7 @@ class SmsCarrier extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $id;
private ?string $name;
private ?string $name = null;
private string $email_pattern;
private \DateTimeInterface $created;
private \DateTimeInterface $modified;
@ -59,7 +59,7 @@ class SmsCarrier extends Entity
public function setName(?string $name): self
{
$this->name = \mb_substr($name, 0, 64);
$this->name = \is_null($name) ? null : \mb_substr($name, 0, 64);
return $this;
}

View File

@ -39,7 +39,7 @@ class UserLocationPrefs extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $user_id;
private ?bool $share_location;
private ?bool $share_location = true;
private \DateTimeInterface $created;
private \DateTimeInterface $modified;

View File

@ -41,7 +41,7 @@ class UserUrlShortenerPrefs extends Entity
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $user_id;
private ?string $url_shortening_service;
private ?string $url_shortening_service = 'internal';
private int $max_url_length;
private int $max_notice_length;
private \DateTimeInterface $created;
@ -60,7 +60,7 @@ class UserUrlShortenerPrefs extends Entity
public function setUrlShorteningService(?string $url_shortening_service): self
{
$this->url_shortening_service = \mb_substr($url_shortening_service, 0, 50);
$this->url_shortening_service = \is_null($url_shortening_service) ? null : \mb_substr($url_shortening_service, 0, 50);
return $this;
}