phpstan level 8 preparation

This commit is contained in:
Spine
2025-07-28 16:55:16 +02:00
parent 889766f032
commit 3e9b2bcb4f
37 changed files with 560 additions and 330 deletions
+3 -2
View File
@@ -117,6 +117,7 @@ class InboxTest extends TestCase {
$postList = $rlist[2]->postList(2, 0);
$postId = $postList[0]['id'];
$pm = $pmReceiverManager->findByPostId($postId);
$this->assertInstanceOf(PM::class, $pm, 'inbox-pm-found');
$this->assertEquals($bodyList[1], $pm->postBody($postId), 'inbox-pm-post-body');
// unread first
@@ -193,7 +194,7 @@ class InboxTest extends TestCase {
Helper::makeUser('inbox.recv.' . randomString(6), 'inbox'),
];
$pm = $this->userList[0]->inbox()->createSystem('system', 'body');
$this->assertEquals(0, $pm->senderId(), 'inbox-system-sender-id');
$this->assertEquals(1, $pm->remove(), 'inbox-system-remove');
$this->assertEquals(0, $pm?->senderId(), 'inbox-system-sender-id');
$this->assertEquals(1, $pm?->remove(), 'inbox-system-remove');
}
}