@@ -34,22 +34,22 @@ |
||
34 | 34 | */ |
35 | 35 | interface IProvidesIcons extends IProvider { |
36 | 36 | |
37 | - /** |
|
38 | - * Get the path to the light (white) icon of this provider |
|
39 | - * |
|
40 | - * @return String |
|
41 | - * |
|
42 | - * @since 15.0.0 |
|
43 | - */ |
|
44 | - public function getLightIcon(): String; |
|
37 | + /** |
|
38 | + * Get the path to the light (white) icon of this provider |
|
39 | + * |
|
40 | + * @return String |
|
41 | + * |
|
42 | + * @since 15.0.0 |
|
43 | + */ |
|
44 | + public function getLightIcon(): String; |
|
45 | 45 | |
46 | - /** |
|
47 | - * Get the path to the dark (black) icon of this provider |
|
48 | - * |
|
49 | - * @return String |
|
50 | - * |
|
51 | - * @since 15.0.0 |
|
52 | - */ |
|
53 | - public function getDarkIcon(): String; |
|
46 | + /** |
|
47 | + * Get the path to the dark (black) icon of this provider |
|
48 | + * |
|
49 | + * @return String |
|
50 | + * |
|
51 | + * @since 15.0.0 |
|
52 | + */ |
|
53 | + public function getDarkIcon(): String; |
|
54 | 54 | |
55 | 55 | } |
@@ -30,19 +30,19 @@ |
||
30 | 30 | |
31 | 31 | class CheckBackupCodes implements IRepairStep { |
32 | 32 | |
33 | - /** @var IJobList */ |
|
34 | - private $jobList; |
|
33 | + /** @var IJobList */ |
|
34 | + private $jobList; |
|
35 | 35 | |
36 | - public function __construct(IJobList $jobList) { |
|
37 | - $this->jobList = $jobList; |
|
38 | - } |
|
36 | + public function __construct(IJobList $jobList) { |
|
37 | + $this->jobList = $jobList; |
|
38 | + } |
|
39 | 39 | |
40 | - public function getName(): string { |
|
41 | - return 'Add background job to check for backup codes'; |
|
42 | - } |
|
40 | + public function getName(): string { |
|
41 | + return 'Add background job to check for backup codes'; |
|
42 | + } |
|
43 | 43 | |
44 | - public function run(IOutput $output) { |
|
45 | - $this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class); |
|
46 | - } |
|
44 | + public function run(IOutput $output) { |
|
45 | + $this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class); |
|
46 | + } |
|
47 | 47 | |
48 | 48 | } |
@@ -33,11 +33,11 @@ |
||
33 | 33 | */ |
34 | 34 | interface IPersonalProviderSettings { |
35 | 35 | |
36 | - /** |
|
37 | - * @return Template |
|
38 | - * |
|
39 | - * @since 15.0.0 |
|
40 | - */ |
|
41 | - public function getBody(): Template; |
|
36 | + /** |
|
37 | + * @return Template |
|
38 | + * |
|
39 | + * @since 15.0.0 |
|
40 | + */ |
|
41 | + public function getBody(): Template; |
|
42 | 42 | |
43 | 43 | } |
@@ -35,13 +35,13 @@ |
||
35 | 35 | */ |
36 | 36 | interface IProvidesPersonalSettings extends IProvider { |
37 | 37 | |
38 | - /** |
|
39 | - * @param IUser $user |
|
40 | - * |
|
41 | - * @return IPersonalProviderSettings |
|
42 | - * |
|
43 | - * @since 15.0.0 |
|
44 | - */ |
|
45 | - public function getPersonalSettings(IUser $user): IPersonalProviderSettings; |
|
38 | + /** |
|
39 | + * @param IUser $user |
|
40 | + * |
|
41 | + * @return IPersonalProviderSettings |
|
42 | + * |
|
43 | + * @since 15.0.0 |
|
44 | + */ |
|
45 | + public function getPersonalSettings(IUser $user): IPersonalProviderSettings; |
|
46 | 46 | |
47 | 47 | } |
@@ -24,11 +24,11 @@ |
||
24 | 24 | <?php if (!is_null($_['backupProvider'])): ?> |
25 | 25 | <p> |
26 | 26 | <a class="two-factor-secondary" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', |
27 | - [ |
|
28 | - 'challengeProviderId' => $_['backupProvider']->getId(), |
|
29 | - 'redirect_url' => $_['redirect_url'], |
|
30 | - ] |
|
31 | - )) ?>"> |
|
27 | + [ |
|
28 | + 'challengeProviderId' => $_['backupProvider']->getId(), |
|
29 | + 'redirect_url' => $_['redirect_url'], |
|
30 | + ] |
|
31 | + )) ?>"> |
|
32 | 32 | <?php p($l->t('Use backup code')) ?> |
33 | 33 | </a> |
34 | 34 | </p> |
@@ -32,19 +32,19 @@ |
||
32 | 32 | */ |
33 | 33 | class ProviderAlreadyExistsException extends HintException { |
34 | 34 | |
35 | - /** |
|
36 | - * ProviderAlreadyExistsException constructor. |
|
37 | - * |
|
38 | - * @since 14.0.0 |
|
39 | - * |
|
40 | - * @param string $newProviderId cloud federation provider ID of the new provider |
|
41 | - * @param string $existingProviderName name of cloud federation provider which already use the same ID |
|
42 | - */ |
|
43 | - public function __construct($newProviderId, $existingProviderName) { |
|
44 | - $l = \OC::$server->getL10N('federation'); |
|
45 | - $message = 'ID "' . $newProviderId . '" already used by cloud federation provider "' . $existingProviderName . '"'; |
|
46 | - $hint = $l->t('ID "%1$s" already used by cloud federation provider "%2$s"', [$newProviderId, $existingProviderName]); |
|
47 | - parent::__construct($message, $hint); |
|
48 | - } |
|
35 | + /** |
|
36 | + * ProviderAlreadyExistsException constructor. |
|
37 | + * |
|
38 | + * @since 14.0.0 |
|
39 | + * |
|
40 | + * @param string $newProviderId cloud federation provider ID of the new provider |
|
41 | + * @param string $existingProviderName name of cloud federation provider which already use the same ID |
|
42 | + */ |
|
43 | + public function __construct($newProviderId, $existingProviderName) { |
|
44 | + $l = \OC::$server->getL10N('federation'); |
|
45 | + $message = 'ID "' . $newProviderId . '" already used by cloud federation provider "' . $existingProviderName . '"'; |
|
46 | + $hint = $l->t('ID "%1$s" already used by cloud federation provider "%2$s"', [$newProviderId, $existingProviderName]); |
|
47 | + parent::__construct($message, $hint); |
|
48 | + } |
|
49 | 49 | |
50 | 50 | } |
@@ -31,18 +31,18 @@ |
||
31 | 31 | */ |
32 | 32 | interface ITimeFactory { |
33 | 33 | |
34 | - /** |
|
35 | - * @return int the result of a call to time() |
|
36 | - * @since 8.0.0 |
|
37 | - */ |
|
38 | - public function getTime(): int; |
|
34 | + /** |
|
35 | + * @return int the result of a call to time() |
|
36 | + * @since 8.0.0 |
|
37 | + */ |
|
38 | + public function getTime(): int; |
|
39 | 39 | |
40 | - /** |
|
41 | - * @param string $time |
|
42 | - * @param \DateTimeZone $timezone |
|
43 | - * @return \DateTime |
|
44 | - * @since 15.0.0 |
|
45 | - */ |
|
46 | - public function getDateTime(string $time = 'now', \DateTimeZone $timezone = null): \DateTime; |
|
40 | + /** |
|
41 | + * @param string $time |
|
42 | + * @param \DateTimeZone $timezone |
|
43 | + * @return \DateTime |
|
44 | + * @since 15.0.0 |
|
45 | + */ |
|
46 | + public function getDateTime(string $time = 'now', \DateTimeZone $timezone = null): \DateTime; |
|
47 | 47 | |
48 | 48 | } |
@@ -46,103 +46,103 @@ |
||
46 | 46 | class DashboardManager implements IDashboardManager { |
47 | 47 | |
48 | 48 | |
49 | - /** @var IWidgetsService */ |
|
50 | - private $widgetsService; |
|
51 | - |
|
52 | - /** @var IEventsService */ |
|
53 | - private $eventsService; |
|
54 | - |
|
55 | - |
|
56 | - /** |
|
57 | - * @param IEventsService $eventsService |
|
58 | - */ |
|
59 | - public function registerEventsService(IEventsService $eventsService) { |
|
60 | - $this->eventsService = $eventsService; |
|
61 | - } |
|
62 | - |
|
63 | - |
|
64 | - /** |
|
65 | - * @param IWidgetsService $widgetsService |
|
66 | - */ |
|
67 | - public function registerWidgetsService(IWidgetsService $widgetsService) { |
|
68 | - $this->widgetsService = $widgetsService; |
|
69 | - } |
|
70 | - |
|
71 | - |
|
72 | - /** |
|
73 | - * @param string $widgetId |
|
74 | - * @param string $userId |
|
75 | - * |
|
76 | - * @return IWidgetConfig |
|
77 | - * @throws DashboardAppNotAvailableException |
|
78 | - */ |
|
79 | - public function getWidgetConfig(string $widgetId, string $userId): IWidgetConfig { |
|
80 | - return $this->getWidgetsService()->getWidgetConfig($widgetId, $userId); |
|
81 | - } |
|
82 | - |
|
83 | - |
|
84 | - /** |
|
85 | - * @param string $widgetId |
|
86 | - * @param array $users |
|
87 | - * @param array $payload |
|
88 | - * @param string $uniqueId |
|
89 | - * |
|
90 | - * @throws DashboardAppNotAvailableException |
|
91 | - */ |
|
92 | - public function createUsersEvent(string $widgetId, array $users, array $payload, string $uniqueId = '') { |
|
93 | - $this->getEventsService()->createUsersEvent($widgetId, $users, $payload, $uniqueId); |
|
94 | - } |
|
95 | - |
|
96 | - |
|
97 | - /** |
|
98 | - * @param string $widgetId |
|
99 | - * @param array $groups |
|
100 | - * @param array $payload |
|
101 | - * @param string $uniqueId |
|
102 | - * |
|
103 | - * @throws DashboardAppNotAvailableException |
|
104 | - */ |
|
105 | - public function createGroupsEvent(string $widgetId, array $groups, array $payload, string $uniqueId = '') { |
|
106 | - $this->getEventsService()->createGroupsEvent($widgetId, $groups, $payload, $uniqueId); |
|
107 | - } |
|
108 | - |
|
109 | - |
|
110 | - /** |
|
111 | - * @param string $widgetId |
|
112 | - * @param array $payload |
|
113 | - * @param string $uniqueId |
|
114 | - * |
|
115 | - * @throws DashboardAppNotAvailableException |
|
116 | - */ |
|
117 | - public function createGlobalEvent(string $widgetId, array $payload, string $uniqueId = '') { |
|
118 | - $this->getEventsService()->createGlobalEvent($widgetId, $payload, $uniqueId); |
|
119 | - } |
|
120 | - |
|
121 | - |
|
122 | - /** |
|
123 | - * @return IWidgetsService |
|
124 | - * @throws DashboardAppNotAvailableException |
|
125 | - */ |
|
126 | - private function getWidgetsService() { |
|
127 | - if ($this->widgetsService === null) { |
|
128 | - throw new DashboardAppNotAvailableException('No IWidgetsService registered'); |
|
129 | - } |
|
130 | - |
|
131 | - return $this->widgetsService; |
|
132 | - } |
|
133 | - |
|
134 | - |
|
135 | - /** |
|
136 | - * @return IEventsService |
|
137 | - * @throws DashboardAppNotAvailableException |
|
138 | - */ |
|
139 | - private function getEventsService() { |
|
140 | - if ($this->eventsService === null) { |
|
141 | - throw new DashboardAppNotAvailableException('No IEventsService registered'); |
|
142 | - } |
|
143 | - |
|
144 | - return $this->eventsService; |
|
145 | - } |
|
49 | + /** @var IWidgetsService */ |
|
50 | + private $widgetsService; |
|
51 | + |
|
52 | + /** @var IEventsService */ |
|
53 | + private $eventsService; |
|
54 | + |
|
55 | + |
|
56 | + /** |
|
57 | + * @param IEventsService $eventsService |
|
58 | + */ |
|
59 | + public function registerEventsService(IEventsService $eventsService) { |
|
60 | + $this->eventsService = $eventsService; |
|
61 | + } |
|
62 | + |
|
63 | + |
|
64 | + /** |
|
65 | + * @param IWidgetsService $widgetsService |
|
66 | + */ |
|
67 | + public function registerWidgetsService(IWidgetsService $widgetsService) { |
|
68 | + $this->widgetsService = $widgetsService; |
|
69 | + } |
|
70 | + |
|
71 | + |
|
72 | + /** |
|
73 | + * @param string $widgetId |
|
74 | + * @param string $userId |
|
75 | + * |
|
76 | + * @return IWidgetConfig |
|
77 | + * @throws DashboardAppNotAvailableException |
|
78 | + */ |
|
79 | + public function getWidgetConfig(string $widgetId, string $userId): IWidgetConfig { |
|
80 | + return $this->getWidgetsService()->getWidgetConfig($widgetId, $userId); |
|
81 | + } |
|
82 | + |
|
83 | + |
|
84 | + /** |
|
85 | + * @param string $widgetId |
|
86 | + * @param array $users |
|
87 | + * @param array $payload |
|
88 | + * @param string $uniqueId |
|
89 | + * |
|
90 | + * @throws DashboardAppNotAvailableException |
|
91 | + */ |
|
92 | + public function createUsersEvent(string $widgetId, array $users, array $payload, string $uniqueId = '') { |
|
93 | + $this->getEventsService()->createUsersEvent($widgetId, $users, $payload, $uniqueId); |
|
94 | + } |
|
95 | + |
|
96 | + |
|
97 | + /** |
|
98 | + * @param string $widgetId |
|
99 | + * @param array $groups |
|
100 | + * @param array $payload |
|
101 | + * @param string $uniqueId |
|
102 | + * |
|
103 | + * @throws DashboardAppNotAvailableException |
|
104 | + */ |
|
105 | + public function createGroupsEvent(string $widgetId, array $groups, array $payload, string $uniqueId = '') { |
|
106 | + $this->getEventsService()->createGroupsEvent($widgetId, $groups, $payload, $uniqueId); |
|
107 | + } |
|
108 | + |
|
109 | + |
|
110 | + /** |
|
111 | + * @param string $widgetId |
|
112 | + * @param array $payload |
|
113 | + * @param string $uniqueId |
|
114 | + * |
|
115 | + * @throws DashboardAppNotAvailableException |
|
116 | + */ |
|
117 | + public function createGlobalEvent(string $widgetId, array $payload, string $uniqueId = '') { |
|
118 | + $this->getEventsService()->createGlobalEvent($widgetId, $payload, $uniqueId); |
|
119 | + } |
|
120 | + |
|
121 | + |
|
122 | + /** |
|
123 | + * @return IWidgetsService |
|
124 | + * @throws DashboardAppNotAvailableException |
|
125 | + */ |
|
126 | + private function getWidgetsService() { |
|
127 | + if ($this->widgetsService === null) { |
|
128 | + throw new DashboardAppNotAvailableException('No IWidgetsService registered'); |
|
129 | + } |
|
130 | + |
|
131 | + return $this->widgetsService; |
|
132 | + } |
|
133 | + |
|
134 | + |
|
135 | + /** |
|
136 | + * @return IEventsService |
|
137 | + * @throws DashboardAppNotAvailableException |
|
138 | + */ |
|
139 | + private function getEventsService() { |
|
140 | + if ($this->eventsService === null) { |
|
141 | + throw new DashboardAppNotAvailableException('No IEventsService registered'); |
|
142 | + } |
|
143 | + |
|
144 | + return $this->eventsService; |
|
145 | + } |
|
146 | 146 | |
147 | 147 | } |
148 | 148 |
@@ -33,16 +33,16 @@ |
||
33 | 33 | */ |
34 | 34 | abstract class QueuedJob extends Job { |
35 | 35 | |
36 | - /** |
|
37 | - * run the job, then remove it from the joblist |
|
38 | - * |
|
39 | - * @param IJobList $jobList |
|
40 | - * @param ILogger|null $logger |
|
41 | - * |
|
42 | - * @since 15.0.0 |
|
43 | - */ |
|
44 | - final public function execute($jobList, ILogger $logger = null) { |
|
45 | - $jobList->remove($this, $this->argument); |
|
46 | - parent::execute($jobList, $logger); |
|
47 | - } |
|
36 | + /** |
|
37 | + * run the job, then remove it from the joblist |
|
38 | + * |
|
39 | + * @param IJobList $jobList |
|
40 | + * @param ILogger|null $logger |
|
41 | + * |
|
42 | + * @since 15.0.0 |
|
43 | + */ |
|
44 | + final public function execute($jobList, ILogger $logger = null) { |
|
45 | + $jobList->remove($this, $this->argument); |
|
46 | + parent::execute($jobList, $logger); |
|
47 | + } |
|
48 | 48 | } |