Fix codestyle issues

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2021-11-23 09:33:31 +01:00
parent eff3c94c6a
commit 596834853b
9 changed files with 25 additions and 25 deletions

View File

@@ -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'));

View File

@@ -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');
}
}

View File

@@ -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));
}

View File

@@ -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');

View File

@@ -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());

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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')

View File

@@ -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() {