[TOOLS] Fix errors reported by PHPStan
This commit is contained in:
parent
5229d4cd8c
commit
8831276489
|
@ -70,7 +70,7 @@ class Feeds extends FeedController
|
||||||
$data = Feed::query(
|
$data = Feed::query(
|
||||||
query: 'note-from:subscribed-person,subscribed-group,subscribed-organization,subscribed-business',
|
query: 'note-from:subscribed-person,subscribed-group,subscribed-organization,subscribed-business',
|
||||||
page: $this->int('p'),
|
page: $this->int('p'),
|
||||||
language: $actor?->getTopLanguage()?->getLocale(),
|
language: $actor->getTopLanguage()->getLocale(),
|
||||||
actor: $actor,
|
actor: $actor,
|
||||||
);
|
);
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -392,7 +392,7 @@ abstract class Formatting
|
||||||
'text' => $match[0],
|
'text' => $match[0],
|
||||||
'position' => $match[1],
|
'position' => $match[1],
|
||||||
'length' => mb_strlen($match[0]),
|
'length' => mb_strlen($match[0]),
|
||||||
'title' => $mentioned?->getFullname() ?? $mentioned?->getNickname(),
|
'title' => $mentioned->getFullname() ?? $mentioned->getNickname(),
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,13 +23,13 @@ declare(strict_types = 1);
|
||||||
|
|
||||||
namespace App\Tests\Controller;
|
namespace App\Tests\Controller;
|
||||||
|
|
||||||
use App\Controller\Feeds;
|
|
||||||
use App\Core\DB\DB;
|
use App\Core\DB\DB;
|
||||||
use App\Core\Security;
|
use App\Core\Security;
|
||||||
use App\Entity\Note;
|
use App\Entity\Note;
|
||||||
use App\Util\Common;
|
use App\Util\Common;
|
||||||
use App\Util\Exception\ClientException;
|
use App\Util\Exception\ClientException;
|
||||||
use App\Util\GNUsocialTestCase;
|
use App\Util\GNUsocialTestCase;
|
||||||
|
use Component\Feed\Controller\Feeds;
|
||||||
use Jchook\AssertThrows\AssertThrows;
|
use Jchook\AssertThrows\AssertThrows;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\RequestStack;
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user