[TOOLS] Continue raising PHPStan level to 6
This commit is contained in:
@@ -29,6 +29,7 @@ use function App\Core\I18n\_m;
|
||||
use App\Core\Router;
|
||||
use App\Entity\Actor;
|
||||
use App\Entity\LocalUser;
|
||||
use App\Entity\Note;
|
||||
use App\Util\Common;
|
||||
use App\Util\Exception\ClientException;
|
||||
use App\Util\Exception\NoSuchNoteException;
|
||||
@@ -39,6 +40,9 @@ use Plugin\PinnedNotes\Entity as E;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @extends FeedController<Note>
|
||||
*/
|
||||
class PinnedNotes extends FeedController
|
||||
{
|
||||
public function listPinsByNickname(Request $request, string $nickname)
|
||||
|
@@ -16,7 +16,8 @@ class PinnedNotes extends Entity
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
public function setId($id)
|
||||
|
||||
public function setId(int $id): self
|
||||
{
|
||||
$this->id = $id;
|
||||
return $this;
|
||||
@@ -26,7 +27,8 @@ class PinnedNotes extends Entity
|
||||
{
|
||||
return $this->actor_id;
|
||||
}
|
||||
public function setActorId($actor_id)
|
||||
|
||||
public function setActorId(int $actor_id): self
|
||||
{
|
||||
$this->actor_id = $actor_id;
|
||||
return $this;
|
||||
@@ -36,7 +38,8 @@ class PinnedNotes extends Entity
|
||||
{
|
||||
return $this->note_id;
|
||||
}
|
||||
public function setNoteId($note_id)
|
||||
|
||||
public function setNoteId(int $note_id): self
|
||||
{
|
||||
$this->note_id = $note_id;
|
||||
return $this;
|
||||
|
@@ -74,7 +74,7 @@ class PinnedNotes extends Plugin
|
||||
return Event::next;
|
||||
}
|
||||
|
||||
public function onBeforeFeed(Request $request, &$res): EventResult
|
||||
public function onBeforeFeed(Request $request, array &$res): EventResult
|
||||
{
|
||||
$path = $request->attributes->get('_route');
|
||||
if ($path === 'actor_view_nickname') {
|
||||
@@ -160,7 +160,7 @@ class PinnedNotes extends Plugin
|
||||
return Event::next;
|
||||
}
|
||||
|
||||
public function onActivityPubAddActivityStreamsTwoData(string $type_name, &$type): EventResult
|
||||
public function onActivityPubAddActivityStreamsTwoData(string $type_name, object &$type): EventResult
|
||||
{
|
||||
if ($type_name === 'Person') {
|
||||
$actor = \Plugin\ActivityPub\Util\Explorer::getOneFromUri($type->get('id'));
|
||||
|
Reference in New Issue
Block a user