Skip to content

Commit 8fb45c2

Browse files
committed
fix(psalm): Fix psalm issues with latest master
IShare is not more typed. Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent 91bd399 commit 8fb45c2

20 files changed

Lines changed: 41 additions & 36 deletions

lib/Cron/SessionsCleanup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(
3232

3333
protected function run($argument) {
3434
$this->logger->debug('Run cleanup job for deck sessions');
35-
35+
3636
$removedSessions = $this->sessionService->removeInactiveSessions();
3737
$this->logger->debug('Removed ' . $removedSessions . ' inactive sessions');
3838
}

lib/Event/ACardEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
abstract class ACardEvent extends Event {
1717
private $card;
18-
18+
1919
public function __construct(Card $card) {
2020
parent::__construct();
2121

lib/Event/BoardUpdatedEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
class BoardUpdatedEvent extends Event {
1616
private $boardId;
17-
17+
1818
public function __construct(int $boardId) {
1919
parent::__construct();
2020

lib/Event/SessionClosedEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class SessionClosedEvent extends Event {
1717
private $boardId;
1818
private $userId;
19-
19+
2020
public function __construct(int $boardId, string $userId) {
2121
parent::__construct();
2222

lib/Event/SessionCreatedEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class SessionCreatedEvent extends Event {
1818
private $boardId;
1919
private $userId;
20-
20+
2121
public function __construct(int $boardId, string $userId) {
2222
parent::__construct();
2323

lib/Listeners/LiveUpdateListener.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ public function handle(Event $event): void {
6565
// else, preventing this person from getting updates
6666
$causingSessionToken = $this->request->getHeader('x-nc-deck-session');
6767
if (
68-
$event instanceof SessionCreatedEvent ||
69-
$event instanceof SessionClosedEvent ||
70-
$event instanceof BoardUpdatedEvent ||
71-
$event instanceof AAclEvent
68+
$event instanceof SessionCreatedEvent
69+
|| $event instanceof SessionClosedEvent
70+
|| $event instanceof BoardUpdatedEvent
71+
|| $event instanceof AAclEvent
7272
) {
7373
$this->sessionService->notifyAllSessions($this->queue, $event->getBoardId(), NotifyPushEvents::DeckBoardUpdate, [
7474
'id' => $event->getBoardId()

lib/Provider/DeckProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ public function improveSearchRequest(ISearchRequest $searchRequest) {
217217
public function improveSearchResult(ISearchResult $searchResult) {
218218
foreach ($searchResult->getDocuments() as $document) {
219219
try {
220-
$board =
221-
$this->fullTextSearchService->getBoardFromCardId((int)$document->getId());
220+
$board
221+
= $this->fullTextSearchService->getBoardFromCardId((int)$document->getId());
222222
$path = '/board/' . $board->getId() . '/card/' . $document->getId();
223223
$document->setLink($this->urlGenerator->linkToRoute('deck.page.index') . $path);
224224
} catch (DoesNotExistException $e) {

lib/Search/FilterStringParser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ private function parseFilterToken(SearchQuery $query, string $token): bool {
7272
$orEquals = $param[1] === '=';
7373
$value = $orEquals ? substr($param, 2) : substr($param, 1);
7474
$comparator = (
75-
($param[0] === '<' ? SearchQuery::COMPARATOR_LESS : 0) |
76-
($param[0] === '>' ? SearchQuery::COMPARATOR_MORE : 0) |
77-
($orEquals ? SearchQuery::COMPARATOR_EQUAL : 0)
75+
($param[0] === '<' ? SearchQuery::COMPARATOR_LESS : 0)
76+
| ($param[0] === '>' ? SearchQuery::COMPARATOR_MORE : 0)
77+
| ($orEquals ? SearchQuery::COMPARATOR_EQUAL : 0)
7878
);
7979
}
8080
$query->addDuedate(new DateQueryParameter('date', $comparator, $this->removeQuotes($value)));

lib/Search/Query/AQueryParameter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ class AQueryParameter {
1818
protected $comparator;
1919
/** @var mixed */
2020
protected $value;
21-
21+
2222
public function getValue() {
2323
if (is_string($this->value) && mb_strlen($this->value) > 1) {
2424
$param = (mb_substr($this->value, 0, 1) === '"' && mb_substr($this->value, -1, 1) === '"') ? mb_substr($this->value, 1, -1): $this->value;
2525
return $param;
2626
}
2727
return $this->value;
2828
}
29-
29+
3030
public function getComparator(): int {
3131
return $this->comparator;
3232
}

lib/Search/Query/SearchQuery.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
class SearchQuery {
1414
public const COMPARATOR_EQUAL = 1;
15-
15+
1616
public const COMPARATOR_LESS = 2;
1717
public const COMPARATOR_MORE = 4;
18-
18+
1919
public const COMPARATOR_LESS_EQUAL = 3;
2020
public const COMPARATOR_MORE_EQUAL = 5;
2121

@@ -42,11 +42,11 @@ public function addTextToken(string $textToken): void {
4242
public function getTextTokens(): array {
4343
return $this->textTokens;
4444
}
45-
45+
4646
public function addTitle(StringQueryParameter $title): void {
4747
$this->title[] = $title;
4848
}
49-
49+
5050
public function getTitle(): array {
5151
return $this->title;
5252
}

0 commit comments

Comments
 (0)