Skip to content

Commit b587fee

Browse files
marcelklehrAndyScherzinger
authored andcommitted
cs:fix
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 76668cc commit b587fee

2 files changed

Lines changed: 58 additions & 66 deletions

File tree

lib/AppInfo/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function __construct() {
8181
}
8282

8383
public function register(IRegistrationContext $context): void {
84-
$context->registerDashboardWidget(OnThisDay::class);
84+
$context->registerDashboardWidget(OnThisDay::class);
8585
/** Register $principalBackend for the DAV collection */
8686
$context->registerServiceAlias('principalBackend', Principal::class);
8787

lib/Dashboard/OnThisDay.php

Lines changed: 57 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,72 @@
11
<?php
2+
23
namespace OCA\Photos\Dashboard;
34

45
use OCA\Photos\AppInfo\Application;
5-
use OCP\AppFramework\Services\IInitialState;
66
use OCP\IInitialStateService;
77
use OCP\Util;
88

9-
class OnThisDay implements \OCP\Dashboard\IWidget
10-
{
11-
/**
12-
* @var \OCP\IL10N
13-
*/
14-
private $l;
15-
/**
16-
* @var \OCP\IURLGenerator
17-
*/
18-
private $url;
19-
/**
20-
* @var \OCP\AppFramework\Services\IInitialState
21-
*/
22-
private $initialState;
9+
class OnThisDay implements \OCP\Dashboard\IWidget {
10+
/**
11+
* @var \OCP\IL10N
12+
*/
13+
private $l;
14+
/**
15+
* @var \OCP\IURLGenerator
16+
*/
17+
private $url;
18+
/**
19+
* @var \OCP\AppFramework\Services\IInitialState
20+
*/
21+
private $initialState;
2322

24-
public function __construct(\OCP\IL10N $l, \OCP\IURLGenerator $url, IInitialStateService $initialState)
25-
{
26-
$this->l = $l;
27-
$this->url = $url;
28-
$this->initialState = $initialState;
29-
}
23+
public function __construct(\OCP\IL10N $l, \OCP\IURLGenerator $url, IInitialStateService $initialState) {
24+
$this->l = $l;
25+
$this->url = $url;
26+
$this->initialState = $initialState;
27+
}
3028

31-
/**
32-
* @inheritDoc
33-
*/
34-
public function getId(): string
35-
{
36-
return 'photos.onthisday';
37-
}
29+
/**
30+
* @inheritDoc
31+
*/
32+
public function getId(): string {
33+
return 'photos.onthisday';
34+
}
3835

39-
/**
40-
* @inheritDoc
41-
*/
42-
public function getTitle(): string
43-
{
44-
return $this->l->t('On This Day');
45-
}
36+
/**
37+
* @inheritDoc
38+
*/
39+
public function getTitle(): string {
40+
return $this->l->t('On This Day');
41+
}
4642

47-
/**
48-
* @inheritDoc
49-
*/
50-
public function getOrder(): int
51-
{
52-
return 20;
53-
}
43+
/**
44+
* @inheritDoc
45+
*/
46+
public function getOrder(): int {
47+
return 20;
48+
}
5449

55-
/**
56-
* @inheritDoc
57-
*/
58-
public function getIconClass(): string
59-
{
60-
return 'icon-calendar-dark';
61-
}
50+
/**
51+
* @inheritDoc
52+
*/
53+
public function getIconClass(): string {
54+
return 'icon-calendar-dark';
55+
}
6256

63-
/**
64-
* @inheritDoc
65-
*/
66-
public function getUrl(): ?string
67-
{
68-
return $this->url->linkToRoute('photos.page.indexthisday');
69-
}
57+
/**
58+
* @inheritDoc
59+
*/
60+
public function getUrl(): ?string {
61+
return $this->url->linkToRoute('photos.page.indexthisday');
62+
}
7063

71-
/**
72-
* @inheritDoc
73-
*/
74-
public function load(): void
75-
{
76-
Util::addScript('photos', 'photos-dashboard');
77-
$this->initialState->provideInitialState('photos', 'image-mimes', Application::IMAGE_MIMES);
78-
$this->initialState->provideInitialState('photos', 'video-mimes', Application::VIDEO_MIMES);
79-
}
64+
/**
65+
* @inheritDoc
66+
*/
67+
public function load(): void {
68+
Util::addScript('photos', 'photos-dashboard');
69+
$this->initialState->provideInitialState('photos', 'image-mimes', Application::IMAGE_MIMES);
70+
$this->initialState->provideInitialState('photos', 'video-mimes', Application::VIDEO_MIMES);
71+
}
8072
}

0 commit comments

Comments
 (0)