diff --git a/lib/Db/CardMapper.php b/lib/Db/CardMapper.php index 529808f55..699c40a06 100644 --- a/lib/Db/CardMapper.php +++ b/lib/Db/CardMapper.php @@ -265,7 +265,7 @@ class CardMapper extends QBMapper implements IPermissionMapper { public function findOverdue() { $qb = $this->db->getQueryBuilder(); - $qb->select('id','title','duedate','notified') + $qb->select('id', 'title', 'duedate', 'notified') ->from('deck_cards') ->where($qb->expr()->lt('duedate', $qb->createFunction('NOW()'))) ->andWhere($qb->expr()->eq('notified', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL))) @@ -276,7 +276,7 @@ class CardMapper extends QBMapper implements IPermissionMapper { public function findUnexposedDescriptionChances() { $qb = $this->db->getQueryBuilder(); - $qb->select('id','title','duedate','notified','description_prev','last_editor','description') + $qb->select('id', 'title', 'duedate', 'notified', 'description_prev', 'last_editor', 'description') ->from('deck_cards') ->where($qb->expr()->isNotNull('last_editor')) ->andWhere($qb->expr()->isNotNull('description_prev')); diff --git a/lib/Search/CardSearchResultEntry.php b/lib/Search/CardSearchResultEntry.php index 4bf2f9b51..a7369b56c 100644 --- a/lib/Search/CardSearchResultEntry.php +++ b/lib/Search/CardSearchResultEntry.php @@ -33,6 +33,6 @@ use OCP\Search\SearchResultEntry; class CardSearchResultEntry extends SearchResultEntry { public function __construct(Board $board, Stack $stack, Card $card, $urlGenerator) { - parent::__construct('', $card->getTitle(), $board->getTitle() . ' » ' . $stack->getTitle() , $urlGenerator->linkToRouteAbsolute('deck.page.index') . '#/board/' . $board->getId() . '/card/' . $card->getId(), 'icon-deck'); + parent::__construct('', $card->getTitle(), $board->getTitle() . ' » ' . $stack->getTitle(), $urlGenerator->linkToRouteAbsolute('deck.page.index') . '#/board/' . $board->getId() . '/card/' . $card->getId(), 'icon-deck'); } } diff --git a/lib/Service/OverviewService.php b/lib/Service/OverviewService.php index a54d9b224..a8bb3990f 100644 --- a/lib/Service/OverviewService.php +++ b/lib/Service/OverviewService.php @@ -138,7 +138,7 @@ class OverviewService { private function findAllBoardsFromUser(string $userId): array { $userInfo = $this->getBoardPrerequisites($userId); $userBoards = $this->boardMapper->findAllByUser($userInfo['user'], null, null); - $groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'],null, null); + $groupBoards = $this->boardMapper->findAllByGroups($userInfo['user'], $userInfo['groups'], null, null); $circleBoards = $this->boardMapper->findAllByCircles($userInfo['user'], null, null); return array_unique(array_merge($userBoards, $groupBoards, $circleBoards)); } diff --git a/lib/Sharing/DeckShareProvider.php b/lib/Sharing/DeckShareProvider.php index 5e6655cd6..6ac48ea8c 100644 --- a/lib/Sharing/DeckShareProvider.php +++ b/lib/Sharing/DeckShareProvider.php @@ -500,7 +500,7 @@ class DeckShareProvider implements \OCP\Share\IShareProvider { ); } - $qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid')); + $qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid')); $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); $qb->orderBy('s.id'); diff --git a/tests/integration/database/BoardDatabaseTest.php b/tests/integration/database/BoardDatabaseTest.php index d86b558df..80d0e111f 100644 --- a/tests/integration/database/BoardDatabaseTest.php +++ b/tests/integration/database/BoardDatabaseTest.php @@ -70,7 +70,7 @@ class BoardDatabaseTest extends \Test\TestCase { $board->setOwner(self::TEST_USER1); $board->setColor('000000'); $board->setLabels([]); - $created = $this->boardService->create('Test', self::TEST_USER1, '000000'); + $created = $this->boardService->create('Test', self::TEST_USER1, '000000'); $id = $created->getId(); $actual = $this->boardService->find($id); $this->assertEquals($actual->getTitle(), $board->getTitle()); diff --git a/tests/unit/Db/AclMapperTest.php b/tests/unit/Db/AclMapperTest.php index f720fdb1a..7272e5626 100644 --- a/tests/unit/Db/AclMapperTest.php +++ b/tests/unit/Db/AclMapperTest.php @@ -65,10 +65,10 @@ class AclMapperTest extends MapperTestUtility { $this->boardMapper->insert($this->getBoard('MyBoard 3', 'user3')) ]; $this->acls = [ - $this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[1]->getId())), - $this->aclMapper->insert($this->getAcl('user','user2', true, false, false, $this->boards[0]->getId())), - $this->aclMapper->insert($this->getAcl('user','user3', true, true, false, $this->boards[0]->getId())), - $this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[2]->getId())) + $this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[1]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user2', true, false, false, $this->boards[0]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user3', true, true, false, $this->boards[0]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[2]->getId())) ]; foreach ($this->acls as $acl) { diff --git a/tests/unit/Db/BoardMapperTest.php b/tests/unit/Db/BoardMapperTest.php index 43060db79..e0dd8a8c0 100644 --- a/tests/unit/Db/BoardMapperTest.php +++ b/tests/unit/Db/BoardMapperTest.php @@ -74,10 +74,10 @@ class BoardMapperTest extends MapperTestUtility { $this->boardMapper->insert($this->getBoard('MyBoard 3', 'user3')) ]; $this->acls = [ - $this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[1]->getId())), - $this->aclMapper->insert($this->getAcl('user','user2', true, false, false, $this->boards[0]->getId())), - $this->aclMapper->insert($this->getAcl('user','user3', true, true, false, $this->boards[0]->getId())), - $this->aclMapper->insert($this->getAcl('user','user1', false, false, false, $this->boards[2]->getId())) + $this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[1]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user2', true, false, false, $this->boards[0]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user3', true, true, false, $this->boards[0]->getId())), + $this->aclMapper->insert($this->getAcl('user', 'user1', false, false, false, $this->boards[2]->getId())) ]; foreach ($this->acls as $acl) { diff --git a/tests/unit/Service/AttachmentServiceTest.php b/tests/unit/Service/AttachmentServiceTest.php index d76bb2c52..5fa5d73cc 100644 --- a/tests/unit/Service/AttachmentServiceTest.php +++ b/tests/unit/Service/AttachmentServiceTest.php @@ -176,9 +176,9 @@ class AttachmentServiceTest extends TestCase { public function testFindAll() { $this->mockPermission(Acl::PERMISSION_READ); $attachments = [ - $this->createAttachment('deck_file','file1'), - $this->createAttachment('deck_file','file2'), - $this->createAttachment('deck_file_invalid','file3'), + $this->createAttachment('deck_file', 'file1'), + $this->createAttachment('deck_file', 'file2'), + $this->createAttachment('deck_file_invalid', 'file3'), ]; $this->attachmentMapper->expects($this->once()) ->method('findAll') @@ -197,14 +197,14 @@ class AttachmentServiceTest extends TestCase { public function testFindAllWithDeleted() { $this->mockPermission(Acl::PERMISSION_READ); $attachments = [ - $this->createAttachment('deck_file','file1'), - $this->createAttachment('deck_file','file2'), - $this->createAttachment('deck_file_invalid','file3'), + $this->createAttachment('deck_file', 'file1'), + $this->createAttachment('deck_file', 'file2'), + $this->createAttachment('deck_file_invalid', 'file3'), ]; $attachmentsDeleted = [ - $this->createAttachment('deck_file','file4'), - $this->createAttachment('deck_file','file5'), - $this->createAttachment('deck_file_invalid','file6'), + $this->createAttachment('deck_file', 'file4'), + $this->createAttachment('deck_file', 'file5'), + $this->createAttachment('deck_file_invalid', 'file6'), ]; $this->attachmentMapper->expects($this->once()) ->method('findAll') diff --git a/tests/unit/controller/CardControllerTest.php b/tests/unit/controller/CardControllerTest.php index 3effe1e62..82d32ef8d 100644 --- a/tests/unit/controller/CardControllerTest.php +++ b/tests/unit/controller/CardControllerTest.php @@ -98,11 +98,11 @@ class CardControllerTest extends TestCase { } public function testAssignLabel() { $this->cardService->expects($this->once())->method('assignLabel'); - $this->controller->assignLabel(1,2); + $this->controller->assignLabel(1, 2); } public function testRemoveLabel() { $this->cardService->expects($this->once())->method('removeLabel'); - $this->controller->removeLabel(1,2); + $this->controller->removeLabel(1, 2); } public function testReorder() {