diff --git a/extensions/mentions/src/Formatter/FormatGroupMentions.php b/extensions/mentions/src/Formatter/FormatGroupMentions.php index 538c289b98..e9398f58e1 100644 --- a/extensions/mentions/src/Formatter/FormatGroupMentions.php +++ b/extensions/mentions/src/Formatter/FormatGroupMentions.php @@ -26,7 +26,7 @@ public function __invoke(Renderer $renderer, mixed $context, string $xml): strin { return Utils::replaceAttributes($xml, 'GROUPMENTION', function ($attributes) use ($context) { $group = ($context instanceof AbstractModel && $context->isRelation('mentionsGroups')) - ? $context->mentionsGroups->find($attributes['id']) + ? $context->mentionsGroups->find($attributes['id']) // @phpstan-ignore-line : Group::find($attributes['id']); if ($group) { diff --git a/extensions/mentions/src/Formatter/FormatPostMentions.php b/extensions/mentions/src/Formatter/FormatPostMentions.php index 1d5ede54ed..f020f7f5ff 100644 --- a/extensions/mentions/src/Formatter/FormatPostMentions.php +++ b/extensions/mentions/src/Formatter/FormatPostMentions.php @@ -32,7 +32,7 @@ public function __invoke(Renderer $renderer, mixed $context, string $xml): strin { return Utils::replaceAttributes($xml, 'POSTMENTION', function ($attributes) use ($context) { $post = ($context instanceof AbstractModel && $context->isRelation('mentionsPosts')) - ? $context->mentionsPosts->find($attributes['id']) + ? $context->mentionsPosts->find($attributes['id']) // @phpstan-ignore-line : Post::find($attributes['id']); if ($post && $post->user) { diff --git a/extensions/mentions/src/Formatter/FormatTagMentions.php b/extensions/mentions/src/Formatter/FormatTagMentions.php index 6a0e9d8beb..e3c15af69f 100644 --- a/extensions/mentions/src/Formatter/FormatTagMentions.php +++ b/extensions/mentions/src/Formatter/FormatTagMentions.php @@ -22,7 +22,7 @@ public function __invoke(Renderer $renderer, mixed $context, string $xml, Reques return Utils::replaceAttributes($xml, 'TAGMENTION', function ($attributes) use ($context) { /** @var Tag|null $tag */ $tag = ($context instanceof AbstractModel && $context->isRelation('mentionsTags')) - ? $context->mentionsTags->find($attributes['id']) + ? $context->mentionsTags->find($attributes['id']) // @phpstan-ignore-line : Tag::query()->find($attributes['id']); if ($tag) { diff --git a/extensions/mentions/src/Formatter/FormatUserMentions.php b/extensions/mentions/src/Formatter/FormatUserMentions.php index 529434b941..74d002940f 100644 --- a/extensions/mentions/src/Formatter/FormatUserMentions.php +++ b/extensions/mentions/src/Formatter/FormatUserMentions.php @@ -28,7 +28,7 @@ public function __invoke(Renderer $renderer, mixed $context, string $xml): strin { return Utils::replaceAttributes($xml, 'USERMENTION', function ($attributes) use ($context) { $user = ($context instanceof AbstractModel && $context->isRelation('mentionsUsers')) - ? $context->mentionsUsers->find($attributes['id']) + ? $context->mentionsUsers->find($attributes['id']) // @phpstan-ignore-line : User::find($attributes['id']); $attributes['deleted'] = false; diff --git a/extensions/mentions/src/Formatter/UnparsePostMentions.php b/extensions/mentions/src/Formatter/UnparsePostMentions.php index 2921b154b1..c0e138846d 100644 --- a/extensions/mentions/src/Formatter/UnparsePostMentions.php +++ b/extensions/mentions/src/Formatter/UnparsePostMentions.php @@ -35,7 +35,7 @@ protected function updatePostMentionTags(mixed $context, string $xml): string { return Utils::replaceAttributes($xml, 'POSTMENTION', function ($attributes) use ($context) { $post = ($context instanceof AbstractModel && $context->isRelation('mentionsPosts')) - ? $context->mentionsPosts->find($attributes['id']) + ? $context->mentionsPosts->find($attributes['id']) // @phpstan-ignore-line : Post::find($attributes['id']); if ($post && $post->user) { diff --git a/extensions/mentions/src/Formatter/UnparseTagMentions.php b/extensions/mentions/src/Formatter/UnparseTagMentions.php index 4da7df9837..06eb0f3735 100644 --- a/extensions/mentions/src/Formatter/UnparseTagMentions.php +++ b/extensions/mentions/src/Formatter/UnparseTagMentions.php @@ -30,7 +30,7 @@ protected function updateTagMentionTags(mixed $context, string $xml): string return Utils::replaceAttributes($xml, 'TAGMENTION', function (array $attributes) use ($context) { /** @var Tag|null $tag */ $tag = ($context instanceof AbstractModel && $context->isRelation('mentionsTags')) - ? $context->mentionsTags->find($attributes['id']) + ? $context->mentionsTags->find($attributes['id']) // @phpstan-ignore-line : Tag::query()->find($attributes['id']); if ($tag) { diff --git a/extensions/mentions/src/Formatter/UnparseUserMentions.php b/extensions/mentions/src/Formatter/UnparseUserMentions.php index 87d3e5b4f1..a278166f9a 100644 --- a/extensions/mentions/src/Formatter/UnparseUserMentions.php +++ b/extensions/mentions/src/Formatter/UnparseUserMentions.php @@ -35,7 +35,7 @@ protected function updateUserMentionTags(mixed $context, string $xml): string { return Utils::replaceAttributes($xml, 'USERMENTION', function ($attributes) use ($context) { $user = ($context instanceof AbstractModel && $context->isRelation('mentionsUsers')) - ? $context->mentionsUsers->find($attributes['id']) + ? $context->mentionsUsers->find($attributes['id']) // @phpstan-ignore-line : User::find($attributes['id']); $attributes['displayname'] = $user?->display_name ?? $this->translator->trans('core.lib.username.deleted_text'); diff --git a/extensions/messages/src/DialogMessage/Event/Creating.php b/extensions/messages/src/DialogMessage/Event/Creating.php index 0e62fc6301..9fe1ec997b 100644 --- a/extensions/messages/src/DialogMessage/Event/Creating.php +++ b/extensions/messages/src/DialogMessage/Event/Creating.php @@ -14,8 +14,8 @@ class Creating { public function __construct( - protected DialogMessage $message, - protected array $data + public DialogMessage $message, + public array $data ) { } } diff --git a/extensions/messages/src/DialogMessage/Event/Updated.php b/extensions/messages/src/DialogMessage/Event/Updated.php index a35d0a54d9..09a5534eb6 100644 --- a/extensions/messages/src/DialogMessage/Event/Updated.php +++ b/extensions/messages/src/DialogMessage/Event/Updated.php @@ -14,7 +14,7 @@ class Updated { public function __construct( - protected DialogMessage $message + public DialogMessage $message ) { } } diff --git a/extensions/messages/src/DialogMessage/Event/Updating.php b/extensions/messages/src/DialogMessage/Event/Updating.php index 4104ad5f9e..1348ada603 100644 --- a/extensions/messages/src/DialogMessage/Event/Updating.php +++ b/extensions/messages/src/DialogMessage/Event/Updating.php @@ -14,8 +14,8 @@ class Updating { public function __construct( - protected DialogMessage $message, - protected array $data + public DialogMessage $message, + public array $data ) { } }