Skip to content

Commit

Permalink
fix(mentions): change/remove typings in unparser
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideIadeluca committed Oct 7, 2024
1 parent 46da02b commit fbe83e8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions extensions/mentions/src/Formatter/UnparsePostMentions.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ 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)
{
if ($xml === null) return $xml;

Check failure on line 37 in extensions/mentions/src/Formatter/UnparsePostMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 7.4

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 37 in extensions/mentions/src/Formatter/UnparsePostMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.3

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 37 in extensions/mentions/src/Formatter/UnparsePostMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.1

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 37 in extensions/mentions/src/Formatter/UnparsePostMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.2

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 37 in extensions/mentions/src/Formatter/UnparsePostMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.0

Strict comparison using === between string and null will always evaluate to false.

$xml = $this->updatePostMentionTags($context, $xml);
$xml = $this->unparsePostMentionTags($xml);

Expand Down
6 changes: 4 additions & 2 deletions extensions/mentions/src/Formatter/UnparseTagMentions.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ 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)
{
if ($xml === null) return $xml;

Check failure on line 27 in extensions/mentions/src/Formatter/UnparseTagMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 7.4

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 27 in extensions/mentions/src/Formatter/UnparseTagMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.3

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 27 in extensions/mentions/src/Formatter/UnparseTagMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.1

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 27 in extensions/mentions/src/Formatter/UnparseTagMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.2

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 27 in extensions/mentions/src/Formatter/UnparseTagMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.0

Strict comparison using === between string and null will always evaluate to false.

$xml = $this->updateTagMentionTags($context, $xml);
$xml = $this->unparseTagMentionTags($xml);

Expand Down
6 changes: 4 additions & 2 deletions extensions/mentions/src/Formatter/UnparseUserMentions.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ 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)
{
if ($xml === null) return $xml;

Check failure on line 38 in extensions/mentions/src/Formatter/UnparseUserMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 7.4

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 38 in extensions/mentions/src/Formatter/UnparseUserMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.3

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 38 in extensions/mentions/src/Formatter/UnparseUserMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.1

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 38 in extensions/mentions/src/Formatter/UnparseUserMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.2

Strict comparison using === between string and null will always evaluate to false.

Check failure on line 38 in extensions/mentions/src/Formatter/UnparseUserMentions.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.0

Strict comparison using === between string and null will always evaluate to false.

$xml = $this->updateUserMentionTags($context, $xml);
$xml = $this->unparseUserMentionTags($xml);

Expand Down

0 comments on commit fbe83e8

Please sign in to comment.