fix phpcs

Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
Luka Trovic
2024-09-26 17:12:20 +02:00
parent 2a7c5b9c9c
commit 439c2b422e
44 changed files with 67 additions and 65 deletions

View File

@@ -31,7 +31,7 @@ class BoardMapper extends QBMapper implements IPermissionMapper {
private IUserManager $userManager,
private IGroupManager $groupManager,
private CirclesService $circlesService,
private LoggerInterface $logger
private LoggerInterface $logger,
) {
parent::__construct($db, 'deck_boards', Board::class);

View File

@@ -45,7 +45,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
IManager $notificationManager,
ICacheFactory $cacheFactory,
$databaseType = 'sqlite3',
$database4ByteSupport = true
$database4ByteSupport = true,
) {
parent::__construct($db, 'deck_cards', Card::class);
$this->labelMapper = $labelMapper;
@@ -402,7 +402,7 @@ class CardMapper extends QBMapper implements IPermissionMapper {
if (count($query->getTag())) {
foreach ($query->getTag() as $index => $tag) {
$qb->innerJoin('c', 'deck_assigned_labels', 'al' . $index, $qb->expr()->eq('c.id', 'al' . $index . '.card_id'));
$qb->innerJoin('al'. $index, 'deck_labels', 'l' . $index, $qb->expr()->eq('al' . $index . '.label_id', 'l' . $index . '.id'));
$qb->innerJoin('al' . $index, 'deck_labels', 'l' . $index, $qb->expr()->eq('al' . $index . '.label_id', 'l' . $index . '.id'));
$qb->andWhere($qb->expr()->iLike('l' . $index . '.title', $qb->createNamedParameter('%' . $this->db->escapeLikeParameter($tag->getValue()) . '%', IQueryBuilder::PARAM_STR)));
}
}

View File

@@ -24,7 +24,7 @@ class ChangeHelper {
IDBConnection $db,
ICacheFactory $cacheFactory,
IRequest $request,
?string $userId
?string $userId,
) {
$this->db = $db;
$this->cache = $cacheFactory->createDistributed('deck_changes');
@@ -43,7 +43,7 @@ class ChangeHelper {
public function cardChanged($cardId, $updateCard = true) {
$time = time();
$etag = md5($time . microtime());
$this->cache->set(self::TYPE_CARD . '-' .$cardId, $etag);
$this->cache->set(self::TYPE_CARD . '-' . $cardId, $etag);
if ($updateCard) {
$sql = 'UPDATE `*PREFIX*deck_cards` SET `last_modified` = ?, `last_editor` = ? WHERE `id` = ?';
$this->db->executeUpdate($sql, [time(), $this->userId, $cardId]);
@@ -60,7 +60,7 @@ class ChangeHelper {
public function stackChanged($stackId, $updateBoard = true) {
$time = time();
$etag = md5($time . microtime());
$this->cache->set(self::TYPE_CARD . '-' .$stackId, $etag);
$this->cache->set(self::TYPE_CARD . '-' . $stackId, $etag);
if ($updateBoard) {
$sql = 'UPDATE `*PREFIX*deck_stacks` SET `last_modified` = ? WHERE `id` = ?';
$this->db->executeUpdate($sql, [time(), $stackId]);
@@ -76,7 +76,7 @@ class ChangeHelper {
}
public function getEtag($type, $id) {
$entry = $this->cache->get($type . '-' .$id);
$entry = $this->cache->get($type . '-' . $id);
if ($entry === 'null') {
return '';
}

View File

@@ -24,7 +24,7 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
public function __construct(
IDBConnection $db,
CardMapper $cardMapper,
ICacheFactory $cacheFactory
ICacheFactory $cacheFactory,
) {
parent::__construct($db, 'deck_stacks', Stack::class);
$this->cardMapper = $cardMapper;