[TOOLS] Fix errors pointed out by PHPStan level 4
This commit is contained in:
@@ -33,6 +33,7 @@ use App\Core\Router;
|
||||
use App\Core\VisibilityScope;
|
||||
use App\Entity\Activity;
|
||||
use App\Entity\Actor;
|
||||
use App\Entity\LocalUser;
|
||||
use App\Entity\Note;
|
||||
use App\Util\Common;
|
||||
use App\Util\Exception\BugFoundException;
|
||||
@@ -180,7 +181,9 @@ class Posting extends Component
|
||||
): array {
|
||||
$scope ??= VisibilityScope::EVERYWHERE; // TODO: If site is private, default to LOCAL
|
||||
$reply_to_id = \is_null($reply_to) ? null : (\is_int($reply_to) ? $reply_to : $reply_to->getId());
|
||||
$mentions = [];
|
||||
|
||||
/** @var array<int, array{ mentioned?: array<int, Actor|LocalUser> }> $mentions */
|
||||
$mentions = [];
|
||||
if (\is_null($rendered) && !empty($content)) {
|
||||
Event::handle('RenderNoteContent', [$content, $content_type, &$rendered, $actor, $locale, &$mentions]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user