diff --git a/src/Entity/Attention.php b/src/Entity/Attention.php index bb6aaf83cd..bd7b06347d 100644 --- a/src/Entity/Attention.php +++ b/src/Entity/Attention.php @@ -50,6 +50,7 @@ class Attention $this->notice_id = $notice_id; return $this; } + public function getNoticeId(): int { return $this->notice_id; @@ -60,6 +61,7 @@ class Attention $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -70,6 +72,7 @@ class Attention $this->reason = $reason; return $this; } + public function getReason(): ?string { return $this->reason; @@ -80,6 +83,7 @@ class Attention $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -90,6 +94,7 @@ class Attention $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/Avatar.php b/src/Entity/Avatar.php index b52fbaa864..b8db2cd6ac 100644 --- a/src/Entity/Avatar.php +++ b/src/Entity/Avatar.php @@ -53,6 +53,7 @@ class Avatar $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -63,6 +64,7 @@ class Avatar $this->original = $original; return $this; } + public function getOriginal(): ?bool { return $this->original; @@ -73,6 +75,7 @@ class Avatar $this->width = $width; return $this; } + public function getWidth(): int { return $this->width; @@ -83,6 +86,7 @@ class Avatar $this->height = $height; return $this; } + public function getHeight(): int { return $this->height; @@ -93,6 +97,7 @@ class Avatar $this->mediatype = $mediatype; return $this; } + public function getMediatype(): string { return $this->mediatype; @@ -103,6 +108,7 @@ class Avatar $this->filename = $filename; return $this; } + public function getFilename(): ?string { return $this->filename; @@ -113,6 +119,7 @@ class Avatar $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -123,6 +130,7 @@ class Avatar $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/Config.php b/src/Entity/Config.php index 99e3f0f8be..46870d2c69 100644 --- a/src/Entity/Config.php +++ b/src/Entity/Config.php @@ -46,6 +46,7 @@ class Config $this->section = $section; return $this; } + public function getSection(): string { return $this->section; @@ -56,6 +57,7 @@ class Config $this->setting = $setting; return $this; } + public function getSetting(): string { return $this->setting; @@ -66,6 +68,7 @@ class Config $this->value = $value; return $this; } + public function getValue(): ?string { return $this->value; diff --git a/src/Entity/ConfirmAddress.php b/src/Entity/ConfirmAddress.php index 8b9b268188..68096a0919 100644 --- a/src/Entity/ConfirmAddress.php +++ b/src/Entity/ConfirmAddress.php @@ -53,6 +53,7 @@ class ConfirmAddress $this->code = $code; return $this; } + public function getCode(): string { return $this->code; @@ -63,6 +64,7 @@ class ConfirmAddress $this->user_id = $user_id; return $this; } + public function getUserId(): ?int { return $this->user_id; @@ -73,6 +75,7 @@ class ConfirmAddress $this->address = $address; return $this; } + public function getAddress(): string { return $this->address; @@ -83,6 +86,7 @@ class ConfirmAddress $this->address_extra = $address_extra; return $this; } + public function getAddressExtra(): ?string { return $this->address_extra; @@ -93,6 +97,7 @@ class ConfirmAddress $this->address_type = $address_type; return $this; } + public function getAddressType(): string { return $this->address_type; @@ -103,6 +108,7 @@ class ConfirmAddress $this->claimed = $claimed; return $this; } + public function getClaimed(): ?DateTimeInterface { return $this->claimed; @@ -113,6 +119,7 @@ class ConfirmAddress $this->sent = $sent; return $this; } + public function getSent(): ?DateTimeInterface { return $this->sent; @@ -123,6 +130,7 @@ class ConfirmAddress $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/Consumer.php b/src/Entity/Consumer.php index 5894bd247d..12f3efed67 100644 --- a/src/Entity/Consumer.php +++ b/src/Entity/Consumer.php @@ -50,6 +50,7 @@ class Consumer $this->consumer_key = $consumer_key; return $this; } + public function getConsumerKey(): string { return $this->consumer_key; @@ -60,6 +61,7 @@ class Consumer $this->consumer_secret = $consumer_secret; return $this; } + public function getConsumerSecret(): string { return $this->consumer_secret; @@ -70,6 +72,7 @@ class Consumer $this->seed = $seed; return $this; } + public function getSeed(): string { return $this->seed; @@ -80,6 +83,7 @@ class Consumer $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -90,6 +94,7 @@ class Consumer $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/Conversation.php b/src/Entity/Conversation.php index 392182cced..04db30ac2c 100644 --- a/src/Entity/Conversation.php +++ b/src/Entity/Conversation.php @@ -48,6 +48,7 @@ class Conversation $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -58,6 +59,7 @@ class Conversation $this->uri = $uri; return $this; } + public function getUri(): string { return $this->uri; @@ -68,6 +70,7 @@ class Conversation $this->url = $url; return $this; } + public function getUrl(): ?string { return $this->url; @@ -78,6 +81,7 @@ class Conversation $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -88,6 +92,7 @@ class Conversation $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/File.php b/src/Entity/File.php index af98860ce8..3efaab385e 100644 --- a/src/Entity/File.php +++ b/src/Entity/File.php @@ -58,6 +58,7 @@ class File $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -68,6 +69,7 @@ class File $this->urlhash = $urlhash; return $this; } + public function getUrlhash(): string { return $this->urlhash; @@ -78,6 +80,7 @@ class File $this->url = $url; return $this; } + public function getUrl(): ?string { return $this->url; @@ -88,6 +91,7 @@ class File $this->filehash = $filehash; return $this; } + public function getFilehash(): ?string { return $this->filehash; @@ -98,6 +102,7 @@ class File $this->mimetype = $mimetype; return $this; } + public function getMimetype(): ?string { return $this->mimetype; @@ -108,6 +113,7 @@ class File $this->size = $size; return $this; } + public function getSize(): ?int { return $this->size; @@ -118,6 +124,7 @@ class File $this->title = $title; return $this; } + public function getTitle(): ?string { return $this->title; @@ -128,6 +135,7 @@ class File $this->date = $date; return $this; } + public function getDate(): ?int { return $this->date; @@ -138,6 +146,7 @@ class File $this->protected = $protected; return $this; } + public function getProtected(): ?int { return $this->protected; @@ -148,6 +157,7 @@ class File $this->filename = $filename; return $this; } + public function getFilename(): ?string { return $this->filename; @@ -158,6 +168,7 @@ class File $this->width = $width; return $this; } + public function getWidth(): ?int { return $this->width; @@ -168,6 +179,7 @@ class File $this->height = $height; return $this; } + public function getHeight(): ?int { return $this->height; @@ -178,6 +190,7 @@ class File $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/FileRedirection.php b/src/Entity/FileRedirection.php index 8c94206534..eb93834546 100644 --- a/src/Entity/FileRedirection.php +++ b/src/Entity/FileRedirection.php @@ -51,6 +51,7 @@ class FileRedirection $this->urlhash = $urlhash; return $this; } + public function getUrlhash(): string { return $this->urlhash; @@ -61,6 +62,7 @@ class FileRedirection $this->url = $url; return $this; } + public function getUrl(): ?string { return $this->url; @@ -71,6 +73,7 @@ class FileRedirection $this->file_id = $file_id; return $this; } + public function getFileId(): ?int { return $this->file_id; @@ -81,6 +84,7 @@ class FileRedirection $this->redirections = $redirections; return $this; } + public function getRedirections(): ?int { return $this->redirections; @@ -91,6 +95,7 @@ class FileRedirection $this->httpcode = $httpcode; return $this; } + public function getHttpcode(): ?int { return $this->httpcode; @@ -101,6 +106,7 @@ class FileRedirection $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/FileThumbnail.php b/src/Entity/FileThumbnail.php index a6d4c77838..80b92acab4 100644 --- a/src/Entity/FileThumbnail.php +++ b/src/Entity/FileThumbnail.php @@ -52,6 +52,7 @@ class FileThumbnail $this->file_id = $file_id; return $this; } + public function getFileId(): int { return $this->file_id; @@ -62,6 +63,7 @@ class FileThumbnail $this->urlhash = $urlhash; return $this; } + public function getUrlhash(): ?string { return $this->urlhash; @@ -72,6 +74,7 @@ class FileThumbnail $this->url = $url; return $this; } + public function getUrl(): ?string { return $this->url; @@ -82,6 +85,7 @@ class FileThumbnail $this->filename = $filename; return $this; } + public function getFilename(): ?string { return $this->filename; @@ -92,6 +96,7 @@ class FileThumbnail $this->width = $width; return $this; } + public function getWidth(): int { return $this->width; @@ -102,6 +107,7 @@ class FileThumbnail $this->height = $height; return $this; } + public function getHeight(): int { return $this->height; @@ -112,6 +118,7 @@ class FileThumbnail $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/FileToPost.php b/src/Entity/FileToPost.php index f31dd41637..e3a11e83e6 100644 --- a/src/Entity/FileToPost.php +++ b/src/Entity/FileToPost.php @@ -48,6 +48,7 @@ class FileToPost $this->file_id = $file_id; return $this; } + public function getFileId(): int { return $this->file_id; @@ -58,6 +59,7 @@ class FileToPost $this->post_id = $post_id; return $this; } + public function getPostId(): int { return $this->post_id; @@ -68,6 +70,7 @@ class FileToPost $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/ForeignLink.php b/src/Entity/ForeignLink.php index 707c320d01..a4b5c80047 100644 --- a/src/Entity/ForeignLink.php +++ b/src/Entity/ForeignLink.php @@ -56,6 +56,7 @@ class ForeignLink $this->user_id = $user_id; return $this; } + public function getUserId(): int { return $this->user_id; @@ -66,6 +67,7 @@ class ForeignLink $this->foreign_id = $foreign_id; return $this; } + public function getForeignId(): int { return $this->foreign_id; @@ -76,6 +78,7 @@ class ForeignLink $this->service = $service; return $this; } + public function getService(): int { return $this->service; @@ -86,6 +89,7 @@ class ForeignLink $this->credentials = $credentials; return $this; } + public function getCredentials(): ?string { return $this->credentials; @@ -96,6 +100,7 @@ class ForeignLink $this->noticesync = $noticesync; return $this; } + public function getNoticesync(): int { return $this->noticesync; @@ -106,6 +111,7 @@ class ForeignLink $this->friendsync = $friendsync; return $this; } + public function getFriendsync(): int { return $this->friendsync; @@ -116,6 +122,7 @@ class ForeignLink $this->profilesync = $profilesync; return $this; } + public function getProfilesync(): int { return $this->profilesync; @@ -126,6 +133,7 @@ class ForeignLink $this->last_noticesync = $last_noticesync; return $this; } + public function getLastNoticesync(): ?DateTimeInterface { return $this->last_noticesync; @@ -136,6 +144,7 @@ class ForeignLink $this->last_friendsync = $last_friendsync; return $this; } + public function getLastFriendsync(): ?DateTimeInterface { return $this->last_friendsync; @@ -146,6 +155,7 @@ class ForeignLink $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -156,6 +166,7 @@ class ForeignLink $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/ForeignService.php b/src/Entity/ForeignService.php index 745c58a0af..e8e281b716 100644 --- a/src/Entity/ForeignService.php +++ b/src/Entity/ForeignService.php @@ -50,6 +50,7 @@ class ForeignService $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -60,6 +61,7 @@ class ForeignService $this->name = $name; return $this; } + public function getName(): string { return $this->name; @@ -70,6 +72,7 @@ class ForeignService $this->description = $description; return $this; } + public function getDescription(): ?string { return $this->description; @@ -80,6 +83,7 @@ class ForeignService $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -90,6 +94,7 @@ class ForeignService $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/ForeignSubscription.php b/src/Entity/ForeignSubscription.php index 165ec782aa..b0e6a91bdf 100644 --- a/src/Entity/ForeignSubscription.php +++ b/src/Entity/ForeignSubscription.php @@ -49,6 +49,7 @@ class ForeignSubscription $this->service = $service; return $this; } + public function getService(): int { return $this->service; @@ -59,6 +60,7 @@ class ForeignSubscription $this->subscriber = $subscriber; return $this; } + public function getSubscriber(): int { return $this->subscriber; @@ -69,6 +71,7 @@ class ForeignSubscription $this->subscribed = $subscribed; return $this; } + public function getSubscribed(): int { return $this->subscribed; @@ -79,6 +82,7 @@ class ForeignSubscription $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; diff --git a/src/Entity/ForeignUser.php b/src/Entity/ForeignUser.php index fb8be3b23d..2a307fd812 100644 --- a/src/Entity/ForeignUser.php +++ b/src/Entity/ForeignUser.php @@ -51,6 +51,7 @@ class ForeignUser $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -61,6 +62,7 @@ class ForeignUser $this->service = $service; return $this; } + public function getService(): int { return $this->service; @@ -71,6 +73,7 @@ class ForeignUser $this->uri = $uri; return $this; } + public function getUri(): string { return $this->uri; @@ -81,6 +84,7 @@ class ForeignUser $this->nickname = $nickname; return $this; } + public function getNickname(): ?string { return $this->nickname; @@ -91,6 +95,7 @@ class ForeignUser $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -101,6 +106,7 @@ class ForeignUser $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/GroupAlias.php b/src/Entity/GroupAlias.php index 938d9aa374..47fe5093df 100644 --- a/src/Entity/GroupAlias.php +++ b/src/Entity/GroupAlias.php @@ -48,6 +48,7 @@ class GroupAlias $this->alias = $alias; return $this; } + public function getAlias(): string { return $this->alias; @@ -58,6 +59,7 @@ class GroupAlias $this->group_id = $group_id; return $this; } + public function getGroupId(): int { return $this->group_id; @@ -68,6 +70,7 @@ class GroupAlias $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/GroupBlock.php b/src/Entity/GroupBlock.php index 00c0e89b71..eba6c17ef1 100644 --- a/src/Entity/GroupBlock.php +++ b/src/Entity/GroupBlock.php @@ -49,6 +49,7 @@ class GroupBlock $this->group_id = $group_id; return $this; } + public function getGroupId(): int { return $this->group_id; @@ -59,6 +60,7 @@ class GroupBlock $this->blocked = $blocked; return $this; } + public function getBlocked(): int { return $this->blocked; @@ -69,6 +71,7 @@ class GroupBlock $this->blocker = $blocker; return $this; } + public function getBlocker(): int { return $this->blocker; @@ -79,6 +82,7 @@ class GroupBlock $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/GroupInbox.php b/src/Entity/GroupInbox.php index 97dc2415a8..2486e47a86 100644 --- a/src/Entity/GroupInbox.php +++ b/src/Entity/GroupInbox.php @@ -48,6 +48,7 @@ class GroupInbox $this->group_id = $group_id; return $this; } + public function getGroupId(): int { return $this->group_id; @@ -58,6 +59,7 @@ class GroupInbox $this->notice_id = $notice_id; return $this; } + public function getNoticeId(): int { return $this->notice_id; @@ -68,6 +70,7 @@ class GroupInbox $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; diff --git a/src/Entity/GroupJoinQueue.php b/src/Entity/GroupJoinQueue.php index e93fc07308..9d8020f489 100644 --- a/src/Entity/GroupJoinQueue.php +++ b/src/Entity/GroupJoinQueue.php @@ -48,6 +48,7 @@ class GroupJoinQueue $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -58,6 +59,7 @@ class GroupJoinQueue $this->group_id = $group_id; return $this; } + public function getGroupId(): int { return $this->group_id; @@ -68,6 +70,7 @@ class GroupJoinQueue $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; diff --git a/src/Entity/GroupMember.php b/src/Entity/GroupMember.php index 98d5a6a436..9f133036bd 100644 --- a/src/Entity/GroupMember.php +++ b/src/Entity/GroupMember.php @@ -51,6 +51,7 @@ class GroupMember $this->group_id = $group_id; return $this; } + public function getGroupId(): int { return $this->group_id; @@ -61,6 +62,7 @@ class GroupMember $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -71,6 +73,7 @@ class GroupMember $this->is_admin = $is_admin; return $this; } + public function getIsAdmin(): ?bool { return $this->is_admin; @@ -81,6 +84,7 @@ class GroupMember $this->uri = $uri; return $this; } + public function getUri(): ?string { return $this->uri; @@ -91,6 +95,7 @@ class GroupMember $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -101,6 +106,7 @@ class GroupMember $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/Invitation.php b/src/Entity/Invitation.php index 412ebbbb6e..803a68daf9 100644 --- a/src/Entity/Invitation.php +++ b/src/Entity/Invitation.php @@ -51,6 +51,7 @@ class Invitation $this->code = $code; return $this; } + public function getCode(): string { return $this->code; @@ -61,6 +62,7 @@ class Invitation $this->user_id = $user_id; return $this; } + public function getUserId(): int { return $this->user_id; @@ -71,6 +73,7 @@ class Invitation $this->address = $address; return $this; } + public function getAddress(): string { return $this->address; @@ -81,6 +84,7 @@ class Invitation $this->address_type = $address_type; return $this; } + public function getAddressType(): string { return $this->address_type; @@ -91,6 +95,7 @@ class Invitation $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -101,6 +106,7 @@ class Invitation $this->registered_user_id = $registered_user_id; return $this; } + public function getRegisteredUserId(): ?int { return $this->registered_user_id; diff --git a/src/Entity/LocalGroup.php b/src/Entity/LocalGroup.php index db6a17fdd5..640558cea4 100644 --- a/src/Entity/LocalGroup.php +++ b/src/Entity/LocalGroup.php @@ -49,6 +49,7 @@ class LocalGroup $this->group_id = $group_id; return $this; } + public function getGroupId(): int { return $this->group_id; @@ -59,6 +60,7 @@ class LocalGroup $this->nickname = $nickname; return $this; } + public function getNickname(): ?string { return $this->nickname; @@ -69,6 +71,7 @@ class LocalGroup $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -79,6 +82,7 @@ class LocalGroup $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/LocationNamespace.php b/src/Entity/LocationNamespace.php index db97f47543..c0a4882ed4 100644 --- a/src/Entity/LocationNamespace.php +++ b/src/Entity/LocationNamespace.php @@ -49,6 +49,7 @@ class LocationNamespace $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -59,6 +60,7 @@ class LocationNamespace $this->description = $description; return $this; } + public function getDescription(): ?string { return $this->description; @@ -69,6 +71,7 @@ class LocationNamespace $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -79,6 +82,7 @@ class LocationNamespace $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/LoginToken.php b/src/Entity/LoginToken.php index 54ff56f010..a4dd2c9f4d 100644 --- a/src/Entity/LoginToken.php +++ b/src/Entity/LoginToken.php @@ -49,6 +49,7 @@ class LoginToken $this->user_id = $user_id; return $this; } + public function getUserId(): int { return $this->user_id; @@ -59,6 +60,7 @@ class LoginToken $this->token = $token; return $this; } + public function getToken(): string { return $this->token; @@ -69,6 +71,7 @@ class LoginToken $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -79,6 +82,7 @@ class LoginToken $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/Nonce.php b/src/Entity/Nonce.php index 1326ead95e..fd845ab40e 100644 --- a/src/Entity/Nonce.php +++ b/src/Entity/Nonce.php @@ -51,6 +51,7 @@ class Nonce $this->consumer_key = $consumer_key; return $this; } + public function getConsumerKey(): string { return $this->consumer_key; @@ -61,6 +62,7 @@ class Nonce $this->tok = $tok; return $this; } + public function getTok(): ?string { return $this->tok; @@ -71,6 +73,7 @@ class Nonce $this->nonce = $nonce; return $this; } + public function getNonce(): string { return $this->nonce; @@ -81,6 +84,7 @@ class Nonce $this->ts = $ts; return $this; } + public function getTs(): DateTimeInterface { return $this->ts; @@ -91,6 +95,7 @@ class Nonce $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -101,6 +106,7 @@ class Nonce $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/Notice.php b/src/Entity/Notice.php index 056837c59b..fea2150194 100644 --- a/src/Entity/Notice.php +++ b/src/Entity/Notice.php @@ -61,6 +61,7 @@ class Notice $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -71,6 +72,7 @@ class Notice $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -81,6 +83,7 @@ class Notice $this->uri = $uri; return $this; } + public function getUri(): ?string { return $this->uri; @@ -91,6 +94,7 @@ class Notice $this->content = $content; return $this; } + public function getContent(): ?string { return $this->content; @@ -101,6 +105,7 @@ class Notice $this->rendered = $rendered; return $this; } + public function getRendered(): ?string { return $this->rendered; @@ -111,6 +116,7 @@ class Notice $this->url = $url; return $this; } + public function getUrl(): ?string { return $this->url; @@ -121,6 +127,7 @@ class Notice $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -131,6 +138,7 @@ class Notice $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; @@ -141,6 +149,7 @@ class Notice $this->reply_to = $reply_to; return $this; } + public function getReplyTo(): ?int { return $this->reply_to; @@ -151,6 +160,7 @@ class Notice $this->is_local = $is_local; return $this; } + public function getIsLocal(): ?int { return $this->is_local; @@ -161,6 +171,7 @@ class Notice $this->source = $source; return $this; } + public function getSource(): ?string { return $this->source; @@ -171,6 +182,7 @@ class Notice $this->conversation = $conversation; return $this; } + public function getConversation(): ?int { return $this->conversation; @@ -181,6 +193,7 @@ class Notice $this->repeat_of = $repeat_of; return $this; } + public function getRepeatOf(): ?int { return $this->repeat_of; @@ -191,6 +204,7 @@ class Notice $this->object_type = $object_type; return $this; } + public function getObjectType(): ?string { return $this->object_type; @@ -201,6 +215,7 @@ class Notice $this->verb = $verb; return $this; } + public function getVerb(): ?string { return $this->verb; @@ -211,6 +226,7 @@ class Notice $this->scope = $scope; return $this; } + public function getScope(): ?int { return $this->scope; diff --git a/src/Entity/NoticeLocation.php b/src/Entity/NoticeLocation.php index 8915403600..4522222e8f 100644 --- a/src/Entity/NoticeLocation.php +++ b/src/Entity/NoticeLocation.php @@ -51,6 +51,7 @@ class NoticeLocation $this->notice_id = $notice_id; return $this; } + public function getNoticeId(): int { return $this->notice_id; @@ -61,6 +62,7 @@ class NoticeLocation $this->lat = $lat; return $this; } + public function getLat(): ?float { return $this->lat; @@ -71,6 +73,7 @@ class NoticeLocation $this->lon = $lon; return $this; } + public function getLon(): ?float { return $this->lon; @@ -81,6 +84,7 @@ class NoticeLocation $this->location_id = $location_id; return $this; } + public function getLocationId(): ?int { return $this->location_id; @@ -91,6 +95,7 @@ class NoticeLocation $this->location_ns = $location_ns; return $this; } + public function getLocationNs(): ?int { return $this->location_ns; @@ -101,6 +106,7 @@ class NoticeLocation $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/NoticePrefs.php b/src/Entity/NoticePrefs.php index 5a31f37850..1d61eaae6c 100644 --- a/src/Entity/NoticePrefs.php +++ b/src/Entity/NoticePrefs.php @@ -53,6 +53,7 @@ class NoticePrefs $this->notice_id = $notice_id; return $this; } + public function getNoticeId(): int { return $this->notice_id; @@ -63,6 +64,7 @@ class NoticePrefs $this->namespace = $namespace; return $this; } + public function getNamespace(): string { return $this->namespace; @@ -73,6 +75,7 @@ class NoticePrefs $this->topic = $topic; return $this; } + public function getTopic(): string { return $this->topic; @@ -83,6 +86,7 @@ class NoticePrefs $this->data = $data; return $this; } + public function getData() { return $this->data; @@ -93,6 +97,7 @@ class NoticePrefs $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -103,6 +108,7 @@ class NoticePrefs $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/NoticeSource.php b/src/Entity/NoticeSource.php index 8614747bb2..039de9a6c8 100644 --- a/src/Entity/NoticeSource.php +++ b/src/Entity/NoticeSource.php @@ -51,6 +51,7 @@ class NoticeSource $this->code = $code; return $this; } + public function getCode(): string { return $this->code; @@ -61,6 +62,7 @@ class NoticeSource $this->name = $name; return $this; } + public function getName(): string { return $this->name; @@ -71,6 +73,7 @@ class NoticeSource $this->url = $url; return $this; } + public function getUrl(): string { return $this->url; @@ -81,6 +84,7 @@ class NoticeSource $this->notice_id = $notice_id; return $this; } + public function getNoticeId(): int { return $this->notice_id; @@ -91,6 +95,7 @@ class NoticeSource $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -101,6 +106,7 @@ class NoticeSource $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/NoticeTag.php b/src/Entity/NoticeTag.php index 43d55e2d3b..77889806fb 100644 --- a/src/Entity/NoticeTag.php +++ b/src/Entity/NoticeTag.php @@ -48,6 +48,7 @@ class NoticeTag $this->tag = $tag; return $this; } + public function getTag(): string { return $this->tag; @@ -58,6 +59,7 @@ class NoticeTag $this->notice_id = $notice_id; return $this; } + public function getNoticeId(): int { return $this->notice_id; @@ -68,6 +70,7 @@ class NoticeTag $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; diff --git a/src/Entity/OauthApplication.php b/src/Entity/OauthApplication.php index 727beb7ae0..5d593f5faf 100644 --- a/src/Entity/OauthApplication.php +++ b/src/Entity/OauthApplication.php @@ -59,6 +59,7 @@ class OauthApplication $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -69,6 +70,7 @@ class OauthApplication $this->owner = $owner; return $this; } + public function getOwner(): int { return $this->owner; @@ -79,6 +81,7 @@ class OauthApplication $this->consumer_key = $consumer_key; return $this; } + public function getConsumerKey(): string { return $this->consumer_key; @@ -89,6 +92,7 @@ class OauthApplication $this->name = $name; return $this; } + public function getName(): string { return $this->name; @@ -99,6 +103,7 @@ class OauthApplication $this->description = $description; return $this; } + public function getDescription(): ?string { return $this->description; @@ -109,6 +114,7 @@ class OauthApplication $this->icon = $icon; return $this; } + public function getIcon(): string { return $this->icon; @@ -119,6 +125,7 @@ class OauthApplication $this->source_url = $source_url; return $this; } + public function getSourceUrl(): ?string { return $this->source_url; @@ -129,6 +136,7 @@ class OauthApplication $this->organization = $organization; return $this; } + public function getOrganization(): ?string { return $this->organization; @@ -139,6 +147,7 @@ class OauthApplication $this->homepage = $homepage; return $this; } + public function getHomepage(): ?string { return $this->homepage; @@ -149,6 +158,7 @@ class OauthApplication $this->callback_url = $callback_url; return $this; } + public function getCallbackUrl(): ?string { return $this->callback_url; @@ -159,6 +169,7 @@ class OauthApplication $this->type = $type; return $this; } + public function getType(): ?int { return $this->type; @@ -169,6 +180,7 @@ class OauthApplication $this->access_type = $access_type; return $this; } + public function getAccessType(): ?int { return $this->access_type; @@ -179,6 +191,7 @@ class OauthApplication $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -189,6 +202,7 @@ class OauthApplication $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/OauthApplicationUser.php b/src/Entity/OauthApplicationUser.php index 486e70512c..d31968187f 100644 --- a/src/Entity/OauthApplicationUser.php +++ b/src/Entity/OauthApplicationUser.php @@ -51,6 +51,7 @@ class OauthApplicationUser $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -61,6 +62,7 @@ class OauthApplicationUser $this->application_id = $application_id; return $this; } + public function getApplicationId(): int { return $this->application_id; @@ -71,6 +73,7 @@ class OauthApplicationUser $this->access_type = $access_type; return $this; } + public function getAccessType(): ?int { return $this->access_type; @@ -81,6 +84,7 @@ class OauthApplicationUser $this->token = $token; return $this; } + public function getToken(): ?string { return $this->token; @@ -91,6 +95,7 @@ class OauthApplicationUser $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -101,6 +106,7 @@ class OauthApplicationUser $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/OauthTokenAssociation.php b/src/Entity/OauthTokenAssociation.php index e4f7e7d459..e6eab2df66 100644 --- a/src/Entity/OauthTokenAssociation.php +++ b/src/Entity/OauthTokenAssociation.php @@ -50,6 +50,7 @@ class OauthTokenAssociation $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -60,6 +61,7 @@ class OauthTokenAssociation $this->application_id = $application_id; return $this; } + public function getApplicationId(): int { return $this->application_id; @@ -70,6 +72,7 @@ class OauthTokenAssociation $this->token = $token; return $this; } + public function getToken(): string { return $this->token; @@ -80,6 +83,7 @@ class OauthTokenAssociation $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -90,6 +94,7 @@ class OauthTokenAssociation $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/OldSchoolPrefs.php b/src/Entity/OldSchoolPrefs.php index 4f9615483b..d084757e3e 100644 --- a/src/Entity/OldSchoolPrefs.php +++ b/src/Entity/OldSchoolPrefs.php @@ -51,6 +51,7 @@ class OldSchoolPrefs $this->user_id = $user_id; return $this; } + public function getUserId(): int { return $this->user_id; @@ -61,6 +62,7 @@ class OldSchoolPrefs $this->stream_mode_only = $stream_mode_only; return $this; } + public function getStreamModeOnly(): ?bool { return $this->stream_mode_only; @@ -71,6 +73,7 @@ class OldSchoolPrefs $this->conversation_tree = $conversation_tree; return $this; } + public function getConversationTree(): ?bool { return $this->conversation_tree; @@ -81,6 +84,7 @@ class OldSchoolPrefs $this->stream_nicknames = $stream_nicknames; return $this; } + public function getStreamNicknames(): ?bool { return $this->stream_nicknames; @@ -91,6 +95,7 @@ class OldSchoolPrefs $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -101,6 +106,7 @@ class OldSchoolPrefs $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/Profile.php b/src/Entity/Profile.php index 90f859b71b..4518d07109 100644 --- a/src/Entity/Profile.php +++ b/src/Entity/Profile.php @@ -58,6 +58,7 @@ class Profile $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -68,6 +69,7 @@ class Profile $this->nickname = $nickname; return $this; } + public function getNickname(): string { return $this->nickname; @@ -78,6 +80,7 @@ class Profile $this->fullname = $fullname; return $this; } + public function getFullname(): ?string { return $this->fullname; @@ -88,6 +91,7 @@ class Profile $this->profileurl = $profileurl; return $this; } + public function getProfileurl(): ?string { return $this->profileurl; @@ -98,6 +102,7 @@ class Profile $this->homepage = $homepage; return $this; } + public function getHomepage(): ?string { return $this->homepage; @@ -108,6 +113,7 @@ class Profile $this->bio = $bio; return $this; } + public function getBio(): ?string { return $this->bio; @@ -118,6 +124,7 @@ class Profile $this->location = $location; return $this; } + public function getLocation(): ?string { return $this->location; @@ -128,6 +135,7 @@ class Profile $this->lat = $lat; return $this; } + public function getLat(): ?float { return $this->lat; @@ -138,6 +146,7 @@ class Profile $this->lon = $lon; return $this; } + public function getLon(): ?float { return $this->lon; @@ -148,6 +157,7 @@ class Profile $this->location_id = $location_id; return $this; } + public function getLocationId(): ?int { return $this->location_id; @@ -158,6 +168,7 @@ class Profile $this->location_ns = $location_ns; return $this; } + public function getLocationNs(): ?int { return $this->location_ns; @@ -168,6 +179,7 @@ class Profile $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -178,6 +190,7 @@ class Profile $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/ProfileBlock.php b/src/Entity/ProfileBlock.php index 49f1608dce..48953d7868 100644 --- a/src/Entity/ProfileBlock.php +++ b/src/Entity/ProfileBlock.php @@ -48,6 +48,7 @@ class ProfileBlock $this->blocker = $blocker; return $this; } + public function getBlocker(): int { return $this->blocker; @@ -58,6 +59,7 @@ class ProfileBlock $this->blocked = $blocked; return $this; } + public function getBlocked(): int { return $this->blocked; @@ -68,6 +70,7 @@ class ProfileBlock $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/ProfileList.php b/src/Entity/ProfileList.php index ceac31516c..a1f243aef8 100644 --- a/src/Entity/ProfileList.php +++ b/src/Entity/ProfileList.php @@ -56,6 +56,7 @@ class ProfileList $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -66,6 +67,7 @@ class ProfileList $this->tagger = $tagger; return $this; } + public function getTagger(): int { return $this->tagger; @@ -76,6 +78,7 @@ class ProfileList $this->tag = $tag; return $this; } + public function getTag(): string { return $this->tag; @@ -86,6 +89,7 @@ class ProfileList $this->description = $description; return $this; } + public function getDescription(): ?string { return $this->description; @@ -96,6 +100,7 @@ class ProfileList $this->private = $private; return $this; } + public function getPrivate(): ?bool { return $this->private; @@ -106,6 +111,7 @@ class ProfileList $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -116,6 +122,7 @@ class ProfileList $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; @@ -126,6 +133,7 @@ class ProfileList $this->uri = $uri; return $this; } + public function getUri(): ?string { return $this->uri; @@ -136,6 +144,7 @@ class ProfileList $this->mainpage = $mainpage; return $this; } + public function getMainpage(): ?string { return $this->mainpage; @@ -146,6 +155,7 @@ class ProfileList $this->tagged_count = $tagged_count; return $this; } + public function getTaggedCount(): ?int { return $this->tagged_count; @@ -156,6 +166,7 @@ class ProfileList $this->subscriber_count = $subscriber_count; return $this; } + public function getSubscriberCount(): ?int { return $this->subscriber_count; diff --git a/src/Entity/ProfilePrefs.php b/src/Entity/ProfilePrefs.php index 89960b254b..40896853d5 100644 --- a/src/Entity/ProfilePrefs.php +++ b/src/Entity/ProfilePrefs.php @@ -51,6 +51,7 @@ class ProfilePrefs $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -61,6 +62,7 @@ class ProfilePrefs $this->namespace = $namespace; return $this; } + public function getNamespace(): string { return $this->namespace; @@ -71,6 +73,7 @@ class ProfilePrefs $this->topic = $topic; return $this; } + public function getTopic(): string { return $this->topic; @@ -81,6 +84,7 @@ class ProfilePrefs $this->data = $data; return $this; } + public function getData() { return $this->data; @@ -91,6 +95,7 @@ class ProfilePrefs $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -101,6 +106,7 @@ class ProfilePrefs $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/ProfileRole.php b/src/Entity/ProfileRole.php index a0550df2bc..06c60043a0 100644 --- a/src/Entity/ProfileRole.php +++ b/src/Entity/ProfileRole.php @@ -48,6 +48,7 @@ class ProfileRole $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -58,6 +59,7 @@ class ProfileRole $this->role = $role; return $this; } + public function getRole(): string { return $this->role; @@ -68,6 +70,7 @@ class ProfileRole $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; diff --git a/src/Entity/ProfileTag.php b/src/Entity/ProfileTag.php index 3266392f5c..90d08425ca 100644 --- a/src/Entity/ProfileTag.php +++ b/src/Entity/ProfileTag.php @@ -49,6 +49,7 @@ class ProfileTag $this->tagger = $tagger; return $this; } + public function getTagger(): int { return $this->tagger; @@ -59,6 +60,7 @@ class ProfileTag $this->tagged = $tagged; return $this; } + public function getTagged(): int { return $this->tagged; @@ -69,6 +71,7 @@ class ProfileTag $this->tag = $tag; return $this; } + public function getTag(): string { return $this->tag; @@ -79,6 +82,7 @@ class ProfileTag $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/ProfileTagSubscription.php b/src/Entity/ProfileTagSubscription.php index a09d79fb21..1c1efffe67 100644 --- a/src/Entity/ProfileTagSubscription.php +++ b/src/Entity/ProfileTagSubscription.php @@ -49,6 +49,7 @@ class ProfileTagSubscription $this->profile_tag_id = $profile_tag_id; return $this; } + public function getProfileTagId(): int { return $this->profile_tag_id; @@ -59,6 +60,7 @@ class ProfileTagSubscription $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -69,6 +71,7 @@ class ProfileTagSubscription $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -79,6 +82,7 @@ class ProfileTagSubscription $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/QueueItem.php b/src/Entity/QueueItem.php index 09e4f820fb..68f289ccb6 100644 --- a/src/Entity/QueueItem.php +++ b/src/Entity/QueueItem.php @@ -50,6 +50,7 @@ class QueueItem $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -60,6 +61,7 @@ class QueueItem $this->frame = $frame; return $this; } + public function getFrame() { return $this->frame; @@ -70,6 +72,7 @@ class QueueItem $this->transport = $transport; return $this; } + public function getTransport(): string { return $this->transport; @@ -80,6 +83,7 @@ class QueueItem $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -90,6 +94,7 @@ class QueueItem $this->claimed = $claimed; return $this; } + public function getClaimed(): ?DateTimeInterface { return $this->claimed; diff --git a/src/Entity/RelatedGroup.php b/src/Entity/RelatedGroup.php index 389c8f549e..499cc28a01 100644 --- a/src/Entity/RelatedGroup.php +++ b/src/Entity/RelatedGroup.php @@ -48,6 +48,7 @@ class RelatedGroup $this->group_id = $group_id; return $this; } + public function getGroupId(): int { return $this->group_id; @@ -58,6 +59,7 @@ class RelatedGroup $this->related_group_id = $related_group_id; return $this; } + public function getRelatedGroupId(): int { return $this->related_group_id; @@ -68,6 +70,7 @@ class RelatedGroup $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; diff --git a/src/Entity/RememberMe.php b/src/Entity/RememberMe.php index 1cf48b816a..938f1b6145 100644 --- a/src/Entity/RememberMe.php +++ b/src/Entity/RememberMe.php @@ -48,6 +48,7 @@ class RememberMe $this->code = $code; return $this; } + public function getCode(): string { return $this->code; @@ -58,6 +59,7 @@ class RememberMe $this->user_id = $user_id; return $this; } + public function getUserId(): int { return $this->user_id; @@ -68,6 +70,7 @@ class RememberMe $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/Reply.php b/src/Entity/Reply.php index 39f382053b..326a8990fa 100644 --- a/src/Entity/Reply.php +++ b/src/Entity/Reply.php @@ -49,6 +49,7 @@ class Reply $this->notice_id = $notice_id; return $this; } + public function getNoticeId(): int { return $this->notice_id; @@ -59,6 +60,7 @@ class Reply $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -69,6 +71,7 @@ class Reply $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; @@ -79,6 +82,7 @@ class Reply $this->replied_id = $replied_id; return $this; } + public function getRepliedId(): ?int { return $this->replied_id; diff --git a/src/Entity/SchemaVersion.php b/src/Entity/SchemaVersion.php index e6515991d2..b4ce05b731 100644 --- a/src/Entity/SchemaVersion.php +++ b/src/Entity/SchemaVersion.php @@ -48,6 +48,7 @@ class SchemaVersion $this->table_name = $table_name; return $this; } + public function getTableName(): string { return $this->table_name; @@ -58,6 +59,7 @@ class SchemaVersion $this->checksum = $checksum; return $this; } + public function getChecksum(): string { return $this->checksum; @@ -68,6 +70,7 @@ class SchemaVersion $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/Session.php b/src/Entity/Session.php index 35b1614285..a2d888d21f 100644 --- a/src/Entity/Session.php +++ b/src/Entity/Session.php @@ -51,6 +51,7 @@ class Session $this->id = $id; return $this; } + public function getId(): string { return $this->id; @@ -61,6 +62,7 @@ class Session $this->session_data = $session_data; return $this; } + public function getSessionData(): ?string { return $this->session_data; @@ -71,6 +73,7 @@ class Session $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -81,6 +84,7 @@ class Session $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/SmsCarrier.php b/src/Entity/SmsCarrier.php index ea98a77bff..88f5823e75 100644 --- a/src/Entity/SmsCarrier.php +++ b/src/Entity/SmsCarrier.php @@ -50,6 +50,7 @@ class SmsCarrier $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -60,6 +61,7 @@ class SmsCarrier $this->name = $name; return $this; } + public function getName(): ?string { return $this->name; @@ -70,6 +72,7 @@ class SmsCarrier $this->email_pattern = $email_pattern; return $this; } + public function getEmailPattern(): string { return $this->email_pattern; @@ -80,6 +83,7 @@ class SmsCarrier $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -90,6 +94,7 @@ class SmsCarrier $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/Subscription.php b/src/Entity/Subscription.php index de4fa99045..63e3424c67 100644 --- a/src/Entity/Subscription.php +++ b/src/Entity/Subscription.php @@ -55,6 +55,7 @@ class Subscription $this->subscriber = $subscriber; return $this; } + public function getSubscriber(): int { return $this->subscriber; @@ -65,6 +66,7 @@ class Subscription $this->subscribed = $subscribed; return $this; } + public function getSubscribed(): int { return $this->subscribed; @@ -75,6 +77,7 @@ class Subscription $this->jabber = $jabber; return $this; } + public function getJabber(): ?bool { return $this->jabber; @@ -85,6 +88,7 @@ class Subscription $this->sms = $sms; return $this; } + public function getSms(): ?bool { return $this->sms; @@ -95,6 +99,7 @@ class Subscription $this->token = $token; return $this; } + public function getToken(): ?string { return $this->token; @@ -105,6 +110,7 @@ class Subscription $this->secret = $secret; return $this; } + public function getSecret(): ?string { return $this->secret; @@ -115,6 +121,7 @@ class Subscription $this->uri = $uri; return $this; } + public function getUri(): ?string { return $this->uri; @@ -125,6 +132,7 @@ class Subscription $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -135,6 +143,7 @@ class Subscription $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/SubscriptionQueue.php b/src/Entity/SubscriptionQueue.php index 0d950d1ddc..83943f728c 100644 --- a/src/Entity/SubscriptionQueue.php +++ b/src/Entity/SubscriptionQueue.php @@ -48,6 +48,7 @@ class SubscriptionQueue $this->subscriber = $subscriber; return $this; } + public function getSubscriber(): int { return $this->subscriber; @@ -58,6 +59,7 @@ class SubscriptionQueue $this->subscribed = $subscribed; return $this; } + public function getSubscribed(): int { return $this->subscribed; @@ -68,6 +70,7 @@ class SubscriptionQueue $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; diff --git a/src/Entity/Token.php b/src/Entity/Token.php index 85be62a1ce..bd38cb75ea 100644 --- a/src/Entity/Token.php +++ b/src/Entity/Token.php @@ -54,6 +54,7 @@ class Token $this->consumer_key = $consumer_key; return $this; } + public function getConsumerKey(): string { return $this->consumer_key; @@ -64,6 +65,7 @@ class Token $this->tok = $tok; return $this; } + public function getTok(): string { return $this->tok; @@ -74,6 +76,7 @@ class Token $this->secret = $secret; return $this; } + public function getSecret(): string { return $this->secret; @@ -84,6 +87,7 @@ class Token $this->type = $type; return $this; } + public function getType(): int { return $this->type; @@ -94,6 +98,7 @@ class Token $this->state = $state; return $this; } + public function getState(): ?int { return $this->state; @@ -104,6 +109,7 @@ class Token $this->verifier = $verifier; return $this; } + public function getVerifier(): ?string { return $this->verifier; @@ -114,6 +120,7 @@ class Token $this->verified_callback = $verified_callback; return $this; } + public function getVerifiedCallback(): ?string { return $this->verified_callback; @@ -124,6 +131,7 @@ class Token $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -134,6 +142,7 @@ class Token $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/UnavailableStatusNetwork.php b/src/Entity/UnavailableStatusNetwork.php index 3358f824e2..8a6ed923a4 100644 --- a/src/Entity/UnavailableStatusNetwork.php +++ b/src/Entity/UnavailableStatusNetwork.php @@ -47,6 +47,7 @@ class UnavailableStatusNetwork $this->nickname = $nickname; return $this; } + public function getNickname(): string { return $this->nickname; @@ -57,6 +58,7 @@ class UnavailableStatusNetwork $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; diff --git a/src/Entity/User.php b/src/Entity/User.php index ea475dbf4e..1adf15d93c 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -70,6 +70,7 @@ class User $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -80,6 +81,7 @@ class User $this->nickname = $nickname; return $this; } + public function getNickname(): ?string { return $this->nickname; @@ -90,6 +92,7 @@ class User $this->password = $password; return $this; } + public function getPassword(): ?string { return $this->password; @@ -100,6 +103,7 @@ class User $this->email = $email; return $this; } + public function getEmail(): ?string { return $this->email; @@ -110,6 +114,7 @@ class User $this->incomingemail = $incomingemail; return $this; } + public function getIncomingemail(): ?string { return $this->incomingemail; @@ -120,6 +125,7 @@ class User $this->emailnotifysub = $emailnotifysub; return $this; } + public function getEmailnotifysub(): ?bool { return $this->emailnotifysub; @@ -130,6 +136,7 @@ class User $this->emailnotifyfav = $emailnotifyfav; return $this; } + public function getEmailnotifyfav(): ?int { return $this->emailnotifyfav; @@ -140,6 +147,7 @@ class User $this->emailnotifynudge = $emailnotifynudge; return $this; } + public function getEmailnotifynudge(): ?bool { return $this->emailnotifynudge; @@ -150,6 +158,7 @@ class User $this->emailnotifymsg = $emailnotifymsg; return $this; } + public function getEmailnotifymsg(): ?bool { return $this->emailnotifymsg; @@ -160,6 +169,7 @@ class User $this->emailnotifyattn = $emailnotifyattn; return $this; } + public function getEmailnotifyattn(): ?bool { return $this->emailnotifyattn; @@ -170,6 +180,7 @@ class User $this->language = $language; return $this; } + public function getLanguage(): ?string { return $this->language; @@ -180,6 +191,7 @@ class User $this->timezone = $timezone; return $this; } + public function getTimezone(): ?string { return $this->timezone; @@ -190,6 +202,7 @@ class User $this->emailpost = $emailpost; return $this; } + public function getEmailpost(): ?bool { return $this->emailpost; @@ -200,6 +213,7 @@ class User $this->sms = $sms; return $this; } + public function getSms(): ?string { return $this->sms; @@ -210,6 +224,7 @@ class User $this->carrier = $carrier; return $this; } + public function getCarrier(): ?int { return $this->carrier; @@ -220,6 +235,7 @@ class User $this->smsnotify = $smsnotify; return $this; } + public function getSmsnotify(): ?bool { return $this->smsnotify; @@ -230,6 +246,7 @@ class User $this->smsreplies = $smsreplies; return $this; } + public function getSmsreplies(): ?bool { return $this->smsreplies; @@ -240,6 +257,7 @@ class User $this->smsemail = $smsemail; return $this; } + public function getSmsemail(): ?string { return $this->smsemail; @@ -250,6 +268,7 @@ class User $this->uri = $uri; return $this; } + public function getUri(): ?string { return $this->uri; @@ -260,6 +279,7 @@ class User $this->autosubscribe = $autosubscribe; return $this; } + public function getAutosubscribe(): ?bool { return $this->autosubscribe; @@ -270,6 +290,7 @@ class User $this->subscribe_policy = $subscribe_policy; return $this; } + public function getSubscribePolicy(): ?int { return $this->subscribe_policy; @@ -280,6 +301,7 @@ class User $this->urlshorteningservice = $urlshorteningservice; return $this; } + public function getUrlshorteningservice(): ?string { return $this->urlshorteningservice; @@ -290,6 +312,7 @@ class User $this->private_stream = $private_stream; return $this; } + public function getPrivateStream(): ?bool { return $this->private_stream; @@ -300,6 +323,7 @@ class User $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -310,6 +334,7 @@ class User $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/UserGroup.php b/src/Entity/UserGroup.php index ea57bd566e..6e3e3011cf 100644 --- a/src/Entity/UserGroup.php +++ b/src/Entity/UserGroup.php @@ -62,6 +62,7 @@ class UserGroup $this->id = $id; return $this; } + public function getId(): int { return $this->id; @@ -72,6 +73,7 @@ class UserGroup $this->profile_id = $profile_id; return $this; } + public function getProfileId(): int { return $this->profile_id; @@ -82,6 +84,7 @@ class UserGroup $this->nickname = $nickname; return $this; } + public function getNickname(): ?string { return $this->nickname; @@ -92,6 +95,7 @@ class UserGroup $this->fullname = $fullname; return $this; } + public function getFullname(): ?string { return $this->fullname; @@ -102,6 +106,7 @@ class UserGroup $this->homepage = $homepage; return $this; } + public function getHomepage(): ?string { return $this->homepage; @@ -112,6 +117,7 @@ class UserGroup $this->description = $description; return $this; } + public function getDescription(): ?string { return $this->description; @@ -122,6 +128,7 @@ class UserGroup $this->location = $location; return $this; } + public function getLocation(): ?string { return $this->location; @@ -132,6 +139,7 @@ class UserGroup $this->original_logo = $original_logo; return $this; } + public function getOriginalLogo(): ?string { return $this->original_logo; @@ -142,6 +150,7 @@ class UserGroup $this->homepage_logo = $homepage_logo; return $this; } + public function getHomepageLogo(): ?string { return $this->homepage_logo; @@ -152,6 +161,7 @@ class UserGroup $this->stream_logo = $stream_logo; return $this; } + public function getStreamLogo(): ?string { return $this->stream_logo; @@ -162,6 +172,7 @@ class UserGroup $this->mini_logo = $mini_logo; return $this; } + public function getMiniLogo(): ?string { return $this->mini_logo; @@ -172,6 +183,7 @@ class UserGroup $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -182,6 +194,7 @@ class UserGroup $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; @@ -192,6 +205,7 @@ class UserGroup $this->uri = $uri; return $this; } + public function getUri(): ?string { return $this->uri; @@ -202,6 +216,7 @@ class UserGroup $this->mainpage = $mainpage; return $this; } + public function getMainpage(): ?string { return $this->mainpage; @@ -212,6 +227,7 @@ class UserGroup $this->join_policy = $join_policy; return $this; } + public function getJoinPolicy(): ?int { return $this->join_policy; @@ -222,6 +238,7 @@ class UserGroup $this->force_scope = $force_scope; return $this; } + public function getForceScope(): ?int { return $this->force_scope; diff --git a/src/Entity/UserImPrefs.php b/src/Entity/UserImPrefs.php index 884a119da4..9099248494 100644 --- a/src/Entity/UserImPrefs.php +++ b/src/Entity/UserImPrefs.php @@ -51,6 +51,7 @@ class UserImPrefs $this->user_id = $user_id; return $this; } + public function getUserId(): int { return $this->user_id; @@ -61,6 +62,7 @@ class UserImPrefs $this->screenname = $screenname; return $this; } + public function getScreenname(): string { return $this->screenname; @@ -71,6 +73,7 @@ class UserImPrefs $this->transport = $transport; return $this; } + public function getTransport(): string { return $this->transport; @@ -81,6 +84,7 @@ class UserImPrefs $this->notify = $notify; return $this; } + public function getNotify(): bool { return $this->notify; @@ -91,6 +95,7 @@ class UserImPrefs $this->replies = $replies; return $this; } + public function getReplies(): bool { return $this->replies; @@ -101,6 +106,7 @@ class UserImPrefs $this->updatefrompresence = $updatefrompresence; return $this; } + public function getUpdatefrompresence(): bool { return $this->updatefrompresence; @@ -111,6 +117,7 @@ class UserImPrefs $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -121,6 +128,7 @@ class UserImPrefs $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/UserLocationPrefs.php b/src/Entity/UserLocationPrefs.php index 60f0495c3e..05863f99a1 100644 --- a/src/Entity/UserLocationPrefs.php +++ b/src/Entity/UserLocationPrefs.php @@ -47,6 +47,7 @@ class UserLocationPrefs $this->user_id = $user_id; return $this; } + public function getUserId(): int { return $this->user_id; @@ -57,6 +58,7 @@ class UserLocationPrefs $this->share_location = $share_location; return $this; } + public function getShareLocation(): ?bool { return $this->share_location; @@ -67,6 +69,7 @@ class UserLocationPrefs $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -77,6 +80,7 @@ class UserLocationPrefs $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/UserUrlshortenerPrefs.php b/src/Entity/UserUrlshortenerPrefs.php index bf69b75cf9..f7974fddec 100644 --- a/src/Entity/UserUrlshortenerPrefs.php +++ b/src/Entity/UserUrlshortenerPrefs.php @@ -51,6 +51,7 @@ class UserUrlshortenerPrefs $this->user_id = $user_id; return $this; } + public function getUserId(): int { return $this->user_id; @@ -61,6 +62,7 @@ class UserUrlshortenerPrefs $this->urlshorteningservice = $urlshorteningservice; return $this; } + public function getUrlshorteningservice(): ?string { return $this->urlshorteningservice; @@ -71,6 +73,7 @@ class UserUrlshortenerPrefs $this->maxurllength = $maxurllength; return $this; } + public function getMaxurllength(): int { return $this->maxurllength; @@ -81,6 +84,7 @@ class UserUrlshortenerPrefs $this->maxnoticelength = $maxnoticelength; return $this; } + public function getMaxnoticelength(): int { return $this->maxnoticelength; @@ -91,6 +95,7 @@ class UserUrlshortenerPrefs $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -101,6 +106,7 @@ class UserUrlshortenerPrefs $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Entity/UserUsername.php b/src/Entity/UserUsername.php index bf1a3d7bb3..3bd0f04938 100644 --- a/src/Entity/UserUsername.php +++ b/src/Entity/UserUsername.php @@ -50,6 +50,7 @@ class UserUsername $this->provider_name = $provider_name; return $this; } + public function getProviderName(): string { return $this->provider_name; @@ -60,6 +61,7 @@ class UserUsername $this->username = $username; return $this; } + public function getUsername(): string { return $this->username; @@ -70,6 +72,7 @@ class UserUsername $this->user_id = $user_id; return $this; } + public function getUserId(): int { return $this->user_id; @@ -80,6 +83,7 @@ class UserUsername $this->created = $created; return $this; } + public function getCreated(): DateTimeInterface { return $this->created; @@ -90,6 +94,7 @@ class UserUsername $this->modified = $modified; return $this; } + public function getModified(): DateTimeInterface { return $this->modified; diff --git a/src/Util/Common.php b/src/Util/Common.php index 8a307282bd..1720881bdd 100644 --- a/src/Util/Common.php +++ b/src/Util/Common.php @@ -30,10 +30,10 @@ namespace App\Util; +use const DIRECTORY_SEPARATOR; use Functional as F; use InvalidArgumentException; use Symfony\Component\Config\Definition\Exception\Exception; -use const DIRECTORY_SEPARATOR; abstract class Common { @@ -42,6 +42,7 @@ abstract class Common * * @param string $section * @param string $field + * * @return mixed */ public static function config(string $section, string $field) @@ -52,7 +53,9 @@ abstract class Common /** * Normalize path by converting \ to / + * * @param string $path + * * @return string */ public static function normalizePath(string $path): string @@ -65,8 +68,10 @@ abstract class Common /** * Get plugin name from it's path, or null if not a plugin + * * @param string $path - * @return string|null + * + * @return null|string */ public static function pluginFromPath(string $path): ?string { @@ -90,7 +95,8 @@ abstract class Common * Check whether $haystack starts with $needle * * @param array|string $haystack if array, check that all strings start with $needle - * @param string $needle + * @param string $needle + * * @return bool */ public static function startsWith($haystack, string $needle): bool @@ -100,16 +106,17 @@ abstract class Common return substr($haystack, 0, $length) === $needle; } return F\every($haystack, - function ($haystack) use ($needle) { - return self::startsWith($haystack, $needle); - }); + function ($haystack) use ($needle) { + return self::startsWith($haystack, $needle); + }); } /** * Check whether $haystack ends with $needle * * @param array|string $haystack if array, check that all strings end with $needle - * @param string $needle + * @param string $needle + * * @return bool */ public static function endsWith($haystack, string $needle) @@ -122,16 +129,18 @@ abstract class Common return substr($haystack, -$length) === $needle; } return F\every($haystack, - function ($haystack) use ($needle) { - return self::endsWith($haystack, $needle); - }); + function ($haystack) use ($needle) { + return self::endsWith($haystack, $needle); + }); } /** * Call $func with only abs($count) arguments, taken either from the * left or right depending on the sign + * * @param callable $func - * @param int $count + * @param int $count + * * @return callable */ public static function arity(callable $func, int $count): callable @@ -146,6 +155,7 @@ abstract class Common /** * @param string $str + * * @return string */ public static function camelCaseToSnakeCase(string $str): string @@ -155,6 +165,7 @@ abstract class Common /** * @param string $str + * * @return string */ public static function snakeCaseToCamelCase(string $str): string @@ -166,8 +177,9 @@ abstract class Common * Indent $in, a string or array, $level levels * * @param array|string $in - * @param int $level - * @param int $count + * @param int $level + * @param int $count + * * @return string */ public static function indent($in, int $level = 1, int $count = 2): string @@ -177,11 +189,13 @@ abstract class Common } elseif (is_array($in)) { $indent = str_repeat(' ', $count * $level); return implode("\n", F\map(F\select($in, - self::arity(function ($s) { return $s != ''; }, 1)), - function ($val) use ($indent) { - return F\concat($indent . $val); - })); + self::arity(function ($s) { + return $s != ''; + }, 1)), + function ($val) use ($indent) { + return F\concat($indent . $val); + })); } - throw new InvalidArgumentException('Common:indent first parameter must be either an array or a string. Input was: '.$in); + throw new InvalidArgumentException('Common:indent first parameter must be either an array or a string. Input was: ' . $in); } } diff --git a/src/Util/GNUsocial.php b/src/Util/GNUsocial.php index 716dbe04f3..9610717c6c 100644 --- a/src/Util/GNUsocial.php +++ b/src/Util/GNUsocial.php @@ -57,8 +57,9 @@ class GNUsocial implements EventSubscriberInterface /** * Symfony dependency injection gives us access to these services - * @param ContainerInterface $container - * @param LoggerInterface $logger + * + * @param ContainerInterface $container + * @param LoggerInterface $logger * @param TranslatorInterface $translator */ public function __construct(ContainerInterface $container, @@ -72,6 +73,7 @@ class GNUsocial implements EventSubscriberInterface /** * Store these services to be accessed statically and load modules + * * @param EventDispatcherInterface $event_dispatcher */ public function register(EventDispatcherInterface $event_dispatcher): void @@ -85,9 +87,11 @@ class GNUsocial implements EventSubscriberInterface /** * Event very early on in the Symfony HTTP lifecycle, but after everyting is registered * where we get access to the event dispatcher - * @param RequestEvent $event - * @param string $event_name + * + * @param RequestEvent $event + * @param string $event_name * @param EventDispatcherInterface $event_dispatcher + * * @return RequestEvent */ public function onKernelRequest(RequestEvent $event, @@ -100,9 +104,11 @@ class GNUsocial implements EventSubscriberInterface /** * Event after everything is initialized when using the `bin/console` command - * @param ConsoleCommandEvent $event - * @param string $event_name + * + * @param ConsoleCommandEvent $event + * @param string $event_name * @param EventDispatcherInterface $event_dispatcher + * * @return ConsoleCommandEvent */ public function onCommand(ConsoleCommandEvent $event, diff --git a/src/Util/GSEvent.php b/src/Util/GSEvent.php index 8f6aded86e..71bf6b1c7f 100644 --- a/src/Util/GSEvent.php +++ b/src/Util/GSEvent.php @@ -69,11 +69,11 @@ abstract class GSEvent * Handlers can also abort processing by throwing an exception; these will * be caught by the closest code and displayed as errors. * - * @param string $name Name of the event - * @param callable $handler Code to run - * @param int $priority Higher runs first + * @param string $name Name of the event + * @param callable $handler Code to run + * @param int $priority Higher runs first + * @param string $ns * - * @param string $ns * @return void */ public static function addHandler(string $name, diff --git a/src/Util/HTML.php b/src/Util/HTML.php index ff90931b2b..18a03d8438 100644 --- a/src/Util/HTML.php +++ b/src/Util/HTML.php @@ -32,9 +32,10 @@ abstract class HTML /** * Creates an HTML tag without attributes * - * @param string $tag + * @param string $tag * @param array|string $content - * @param bool $empty_tag + * @param bool $empty_tag + * * @return array */ private static function tag(string $tag, $content = '', bool $empty_tag = false): array @@ -45,10 +46,11 @@ abstract class HTML /** * Create tag, possibly with attributes and indentation * - * @param string $tag - * @param array|string $attrs - element attributes - * @param array|string $content - what goes inside the tag - * @param bool $empty_tag + * @param string $tag + * @param array|string $attrs - element attributes + * @param array|string $content - what goes inside the tag + * @param bool $empty_tag + * * @return array */ private static function attr_tag(string $tag, $attrs, $content = '', bool $empty_tag = false): array @@ -66,15 +68,19 @@ abstract class HTML * Attribute with given optional value * * @param array $attrs + * * @return string */ private static function attr(array $attrs): string { - return ' ' . implode(' ', F\map($attrs, function ($val, $key, $_) { return "{$key} = '{$val}'"; })); + return ' ' . implode(' ', F\map($attrs, function ($val, $key, $_) { + return "{$key} = '{$val}'"; + })); } /** * @param $html + * * @return string */ public static function html($html): string diff --git a/src/Util/I18n.php b/src/Util/I18n.php index 96a63dc115..7be0454c77 100644 --- a/src/Util/I18n.php +++ b/src/Util/I18n.php @@ -115,36 +115,37 @@ abstract class I18n * @throws InvalidArgumentException * * @return string + * */ function _m(string $msg /*, ...*/): string { $domain = I18n::_mdomain(debug_backtrace()); $args = func_get_args(); switch (count($args)) { - case 1: - // Empty parameters - return I18n::$translator->trans($msg, [], $domain); - case 2: - $context = $args[0]; - $msg_single = $args[1]; - // ASCII 4 is EOT, used to separate context from string - return I18n::$translator->trans($context . '\004' . $msg_single, [], $domain); - case 3: - // '|' separates the singular from the plural version - $msg_single = $args[0]; - $msg_plural = $args[1]; - $n = $args[2]; - return I18n::$translator->trans($msg_single . '|' . $msg_plural, ['%d' => $n], $domain); - case 4: - // Combine both - $context = $args[0]; - $msg_single = $args[1]; - $msg_plural = $args[2]; - $n = $args[3]; - return I18n::$translator->trans($context . '\004' . $msg_single . '|' . $msg_plural, - ['%d' => $n], $domain); - default: - throw new InvalidArgumentException('Bad parameter count to _m()'); + case 1: + // Empty parameters + return I18n::$translator->trans($msg, [], $domain); + case 2: + $context = $args[0]; + $msg_single = $args[1]; + // ASCII 4 is EOT, used to separate context from string + return I18n::$translator->trans($context . '\004' . $msg_single, [], $domain); + case 3: + // '|' separates the singular from the plural version + $msg_single = $args[0]; + $msg_plural = $args[1]; + $n = $args[2]; + return I18n::$translator->trans($msg_single . '|' . $msg_plural, ['%d' => $n], $domain); + case 4: + // Combine both + $context = $args[0]; + $msg_single = $args[1]; + $msg_plural = $args[2]; + $n = $args[3]; + return I18n::$translator->trans($context . '\004' . $msg_single . '|' . $msg_plural, + ['%d' => $n], $domain); + default: + throw new InvalidArgumentException('Bad parameter count to _m()'); } } @@ -161,7 +162,7 @@ function client_preferred_language(string $http_accept_lang_header): string $all_languages = Common::config('site', 'languages'); preg_match_all('"(((\S\S)-?(\S\S)?)(;q=([0-9.]+))?)\s*(,\s*|$)"', - strtolower($http_accept_lang_header), $http_langs); + strtolower($http_accept_lang_header), $http_langs); for ($i = 0; $i < count($http_langs); ++$i) { if (!empty($http_langs[2][$i])) { @@ -214,7 +215,7 @@ function is_rtl(string $lang_value): bool return $info['direction'] == 'rtl'; } } - throw new InvalidArgumentException('is_rtl function received an invalid lang to test. Lang was: '.$lang_value); + throw new InvalidArgumentException('is_rtl function received an invalid lang to test. Lang was: ' . $lang_value); } /** diff --git a/src/Util/ModulesManager.php b/src/Util/ModulesManager.php index 99b8828f92..10a91ff67b 100644 --- a/src/Util/ModulesManager.php +++ b/src/Util/ModulesManager.php @@ -56,9 +56,9 @@ abstract class ModulesManager $methods = get_class_methods($class); $events = F\select($methods, F\partial_right('App\Util\Common::startsWith', 'on')); F\map($events, - function (string $m) use ($class) { - Event::addHandler(substr($m, 2), [$class, $m]); - }); + function (string $m) use ($class) { + Event::addHandler(substr($m, 2), [$class, $m]); + }); } } } diff --git a/src/Util/RouteLoader.php b/src/Util/RouteLoader.php index f3a64623b5..717c13873a 100644 --- a/src/Util/RouteLoader.php +++ b/src/Util/RouteLoader.php @@ -46,8 +46,9 @@ class RouteLoader extends Loader * Must conform to symfony's interface, but the $resource is unused * and $type must not be null * - * @param mixed $resource - * @param string|null $type + * @param mixed $resource + * @param null|string $type + * * @return RouteCollection */ public function load($resource, string $type = null): RouteCollection @@ -67,47 +68,47 @@ class RouteLoader extends Loader /** * Connect a route to a controller * - * @param string $id - * @param string $uri_path - * @param mixed $target Some kind of callable, typically [object, method] - * @param array|null $param_reqs - * @param array|null $options Possible keys are ['condition', 'defaults', 'format', - * 'fragment', 'http-methods', 'locale', 'methods', 'schemes'] - * 'http-methods' and 'methods' are aliases + * @param string $id + * @param string $uri_path + * @param mixed $target Some kind of callable, typically [object, method] + * @param null|array $param_reqs + * @param null|array $options Possible keys are ['condition', 'defaults', 'format', + * 'fragment', 'http-methods', 'locale', 'methods', 'schemes'] + * 'http-methods' and 'methods' are aliases */ public function connect(string $id, string $uri_path, $target, ?array $param_reqs = [], ?array $options = []) { $this->rc->add($id, - new Route( - // path -- URI path - $uri_path, - // defaults = [] -- param default values, - // and special configuration options - array_merge( - [ - '_controller' => is_array($target) ? $target : [$target, '__invoke'], - '_format' => $options['format'] ?? 'html', - '_fragment' => $options['fragment'] ?? '', - '_locale' => $options['locale'] ?? '', - ], - $options['defaults'] ?? []), - // requirements = [] -- param => regex - $param_reqs, - // options = [] -- possible keys: compiler_class:, utf8 - // No need for a special compiler class for now, - // Enforce UTF8 - ['utf8' => true], - // host = '' -- hostname (subdomain, for instance) to match, - // we don't want this - '', - // schemes = [] -- URI schemes (https, ftp and such) - $options['schemes'] ?? [], - // methods = [] -- HTTP methods - $options['http-methods'] ?? $options['methods'] ?? [], - // condition = '' -- Symfony condition expression, - // see https://symfony.com/doc/current/routing.html#matching-expressions - $options['condition'] ?? '' - ) + new Route( + // path -- URI path + $uri_path, + // defaults = [] -- param default values, + // and special configuration options + array_merge( + [ + '_controller' => is_array($target) ? $target : [$target, '__invoke'], + '_format' => $options['format'] ?? 'html', + '_fragment' => $options['fragment'] ?? '', + '_locale' => $options['locale'] ?? '', + ], + $options['defaults'] ?? []), + // requirements = [] -- param => regex + $param_reqs, + // options = [] -- possible keys: compiler_class:, utf8 + // No need for a special compiler class for now, + // Enforce UTF8 + ['utf8' => true], + // host = '' -- hostname (subdomain, for instance) to match, + // we don't want this + '', + // schemes = [] -- URI schemes (https, ftp and such) + $options['schemes'] ?? [], + // methods = [] -- HTTP methods + $options['http-methods'] ?? $options['methods'] ?? [], + // condition = '' -- Symfony condition expression, + // see https://symfony.com/doc/current/routing.html#matching-expressions + $options['condition'] ?? '' + ) ); } @@ -116,8 +117,9 @@ class RouteLoader extends Loader * Passed the arguments from the `RoutingConfigurator::import` call from * `config/routes.php` * - * @param mixed $resource Unused - * @param string|null $type + * @param mixed $resource Unused + * @param null|string $type + * * @return bool */ public function supports($resource, string $type = null) diff --git a/src/Util/SchemaDefDriver.php b/src/Util/SchemaDefDriver.php index 0be9f2d5f7..18e03e9949 100644 --- a/src/Util/SchemaDefDriver.php +++ b/src/Util/SchemaDefDriver.php @@ -83,12 +83,12 @@ class SchemaDefDriver extends StaticPHPDriver // TODO // Convert old to new types $type = // $name === 'date' - // // Old date fields were stored as int, store as datetime/timestamp - // ? 'datetime' - // // For ints, prepend the size (smallint) - // // The size field doesn't exist otherwise - // : - self::types[($opts['size'] ?? '') . $opts['type']]; + // // Old date fields were stored as int, store as datetime/timestamp + // ? 'datetime' + // // For ints, prepend the size (smallint) + // // The size field doesn't exist otherwise + // : + self::types[($opts['size'] ?? '') . $opts['type']]; $unique = null; foreach ($schema['unique keys'] ?? [] as $key => $uniq_arr) { @@ -119,8 +119,8 @@ class SchemaDefDriver extends StaticPHPDriver 'scale' => $opts['scale'] ?? null, 'options' => [ 'comment' => $opts['description'] ?? null, - 'default' => $opts['default'] ?? null, - 'unsigned' => $opts['unsigned'] ?? null, + 'default' => $opts['default'] ?? null, + 'unsigned' => $opts['unsigned'] ?? null, // bool, optional 'fixed' => $opts['type'] === 'char', // 'collation' => string, unused @@ -129,7 +129,7 @@ class SchemaDefDriver extends StaticPHPDriver // 'columnDefinition', unused ]; // The optional feilds from earlier were populated with null, remove them - $field = array_filter($field, F\not('is_null')); + $field = array_filter($field, F\not('is_null')); $field['options'] = array_filter($field['options'], F\not('is_null')); $metadata->mapField($field); @@ -146,6 +146,7 @@ class SchemaDefDriver extends StaticPHPDriver * instead of `loadMetadata`. * * @param string $class_name + * * @return bool */ public function isTransient($class_name) @@ -155,7 +156,9 @@ class SchemaDefDriver extends StaticPHPDriver /** * Convert [$key => $val] to ['name' => $key, 'columns' => $val] + * * @param array $arr + * * @return array */ private static function kv_to_name_col(array $arr): array