Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] fix(core, mentions): return null if content left empty in formatter #4059

Merged
merged 11 commits into from
Oct 8, 2024
Prev Previous commit
Next Next commit
fix(mentions): change/remove typings in unparser
  • Loading branch information
DavideIadeluca committed Oct 7, 2024
commit 2d598e5deed63f826b7cf78207c0f712ccbea5f8
4 changes: 2 additions & 2 deletions extensions/mentions/src/Formatter/UnparsePostMentions.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public function __construct(TranslatorInterface $translator)
*
* @param string $xml
* @param mixed $context
* @return string $xml to be unparsed
* @return mixed $xml to be unparsed
*/
public function __invoke($context, string $xml)
public function __invoke($context, $xml)
{
$xml = $this->updatePostMentionTags($context, $xml);
$xml = $this->unparsePostMentionTags($xml);
Expand Down
4 changes: 2 additions & 2 deletions extensions/mentions/src/Formatter/UnparseTagMentions.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class UnparseTagMentions
*
* @param string $xml
* @param mixed $context
* @return string $xml to be unparsed
* @return mixed $xml to be unparsed
*/
public function __invoke($context, string $xml)
public function __invoke($context, $xml)
{
$xml = $this->updateTagMentionTags($context, $xml);
$xml = $this->unparseTagMentionTags($xml);
Expand Down
4 changes: 2 additions & 2 deletions extensions/mentions/src/Formatter/UnparseUserMentions.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public function __construct(TranslatorInterface $translator)
*
* @param string $xml
* @param mixed $context
* @return string $xml to be unparsed
* @return mixed $xml to be unparsed
*/
public function __invoke($context, string $xml)
public function __invoke($context, $xml)
{
$xml = $this->updateUserMentionTags($context, $xml);
$xml = $this->unparseUserMentionTags($xml);
Expand Down