Skip to content

Commit b58d236

Browse files
fix: psalm
Signed-off-by: samuelsonmesquita <[email protected]>
1 parent ba17304 commit b58d236

1 file changed

Lines changed: 13 additions & 34 deletions

File tree

lib/Dashboard/PendingSignaturesWidget.php

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
namespace OCA\Libresign\Dashboard;
1111

12+
use OCA\Libresign\AppInfo\Application;
1213
use OCA\Libresign\Db\SignRequestMapper;
1314
use OCA\Libresign\Service\SignFileService;
14-
use OCA\Libresign\AppInfo\Application;
1515
use OCP\Dashboard\IAPIWidget;
1616
use OCP\Dashboard\IAPIWidgetV2;
1717
use OCP\Dashboard\IButtonWidget;
@@ -22,7 +22,7 @@
2222
use OCP\IL10N;
2323
use OCP\IURLGenerator;
2424
use OCP\IUserSession;
25-
use OCP\Util;
25+
use Override;
2626

2727
class PendingSignaturesWidget implements IAPIWidget, IAPIWidgetV2, IButtonWidget, IIconWidget {
2828
public function __construct(
@@ -34,60 +34,44 @@ public function __construct(
3434
) {
3535
}
3636

37-
/**
38-
* @inheritDoc
39-
*/
37+
#[Override]
4038
public function getId(): string {
4139
return 'libresign_pending_signatures';
4240
}
4341

44-
/**
45-
* @inheritDoc
46-
*/
42+
#[Override]
4743
public function getTitle(): string {
4844
return $this->l10n->t('Pending signatures');
4945
}
5046

51-
/**
52-
* @inheritDoc
53-
*/
47+
#[Override]
5448
public function getOrder(): int {
5549
return 10;
5650
}
5751

58-
/**
59-
* @inheritDoc
60-
*/
52+
#[Override]
6153
public function getIconClass(): string {
6254
return 'icon-libresign';
6355
}
6456

65-
/**
66-
* @inheritDoc
67-
*/
57+
#[Override]
6858
public function getIconUrl(): string {
6959
return $this->urlGenerator->getAbsoluteURL(
7060
$this->urlGenerator->imagePath(Application::APP_ID, 'app-dark.svg')
7161
);
7262
}
7363

74-
/**
75-
* @inheritDoc
76-
*/
64+
#[Override]
7765
public function getUrl(): ?string {
7866
return $this->urlGenerator->linkToRouteAbsolute('libresign.page.index');
7967
}
8068

81-
/**
82-
* @inheritDoc
83-
*/
69+
#[Override]
8470
public function load(): void {
85-
71+
// No special loading required
8672
}
8773

88-
/**
89-
* @inheritDoc
90-
*/
74+
#[Override]
9175
public function getItemsV2(string $userId, ?string $since = null, int $limit = 7): WidgetItems {
9276
try {
9377
$user = $this->userSession->getUser();
@@ -213,18 +197,13 @@ private function getTimestamp(\OCA\Libresign\Db\File $fileEntity): string {
213197
return '';
214198
}
215199

216-
/**
217-
* @inheritDoc
218-
* @deprecated Use getItemsV2 instead
219-
*/
200+
#[Override]
220201
public function getItems(string $userId, ?string $since = null, int $limit = 7): array {
221202
$widgetItems = $this->getItemsV2($userId, $since, $limit);
222203
return $widgetItems->getItems();
223204
}
224205

225-
/**
226-
* @inheritDoc
227-
*/
206+
#[Override]
228207
public function getWidgetButtons(string $userId): array {
229208
return [
230209
new WidgetButton(

0 commit comments

Comments
 (0)