refactor: Fix psalm issues
- Add typing for most of the services, controllers and mappers - Add api doc for mappers - Use vendor-bin for psalm - Use attributes for controllers - Fix upload of attachments Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
This commit is contained in:
@@ -119,7 +119,7 @@ class AttachmentMapperTest extends TestCase {
|
||||
->method('isOwner')
|
||||
->with('admin', 1)
|
||||
->willReturn(true);
|
||||
$this->assertTrue($this->attachmentMapper->isOwner('admin', (string)$this->attachments[0]->getId()));
|
||||
$this->assertTrue($this->attachmentMapper->isOwner('admin', $this->attachments[0]->getId()));
|
||||
}
|
||||
|
||||
public function testIsOwnerInvalid() {
|
||||
@@ -127,7 +127,7 @@ class AttachmentMapperTest extends TestCase {
|
||||
->method('isOwner')
|
||||
->with('admin', 1)
|
||||
->will($this->throwException(new DoesNotExistException('does not exist')));
|
||||
$this->assertFalse($this->attachmentMapper->isOwner('admin', (string)$this->attachments[0]->getId()));
|
||||
$this->assertFalse($this->attachmentMapper->isOwner('admin', $this->attachments[0]->getId()));
|
||||
}
|
||||
|
||||
public function testFindBoardId() {
|
||||
|
||||
@@ -81,8 +81,8 @@ class CardTest extends TestCase {
|
||||
'duedate' => null,
|
||||
'overdue' => 0,
|
||||
'archived' => false,
|
||||
'attachments' => null,
|
||||
'attachmentCount' => null,
|
||||
'attachments' => [],
|
||||
'attachmentCount' => 0,
|
||||
'assignedUsers' => null,
|
||||
'deletedAt' => 0,
|
||||
'commentsUnread' => 0,
|
||||
@@ -110,8 +110,8 @@ class CardTest extends TestCase {
|
||||
'duedate' => null,
|
||||
'overdue' => 0,
|
||||
'archived' => false,
|
||||
'attachments' => null,
|
||||
'attachmentCount' => null,
|
||||
'attachments' => [],
|
||||
'attachmentCount' => 0,
|
||||
'assignedUsers' => null,
|
||||
'deletedAt' => 0,
|
||||
'commentsUnread' => 0,
|
||||
@@ -141,8 +141,8 @@ class CardTest extends TestCase {
|
||||
'duedate' => null,
|
||||
'overdue' => 0,
|
||||
'archived' => false,
|
||||
'attachments' => null,
|
||||
'attachmentCount' => null,
|
||||
'attachments' => [],
|
||||
'attachmentCount' => 0,
|
||||
'assignedUsers' => ['user1'],
|
||||
'deletedAt' => 0,
|
||||
'commentsUnread' => 0,
|
||||
|
||||
Reference in New Issue
Block a user