[TOOLS] Fix errors reported by PHPStan

This commit is contained in:
Hugo Sales 2021-12-29 13:34:20 +00:00
parent 5229d4cd8c
commit 8831276489
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
3 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ class Feeds extends FeedController
$data = Feed::query(
query: 'note-from:subscribed-person,subscribed-group,subscribed-organization,subscribed-business',
page: $this->int('p'),
language: $actor?->getTopLanguage()?->getLocale(),
language: $actor->getTopLanguage()->getLocale(),
actor: $actor,
);
return [

View File

@ -392,7 +392,7 @@ abstract class Formatting
'text' => $match[0],
'position' => $match[1],
'length' => mb_strlen($match[0]),
'title' => $mentioned?->getFullname() ?? $mentioned?->getNickname(),
'title' => $mentioned->getFullname() ?? $mentioned->getNickname(),
'url' => $url,
];
}

View File

@ -23,13 +23,13 @@ declare(strict_types = 1);
namespace App\Tests\Controller;
use App\Controller\Feeds;
use App\Core\DB\DB;
use App\Core\Security;
use App\Entity\Note;
use App\Util\Common;
use App\Util\Exception\ClientException;
use App\Util\GNUsocialTestCase;
use Component\Feed\Controller\Feeds;
use Jchook\AssertThrows\AssertThrows;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;