chore(psalm): Add type hints to make psalm happy
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -42,7 +42,7 @@ class Filter implements \OCP\Activity\IFilter {
|
||||
* @return string Lowercase a-z and underscore only identifier
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getIdentifier() {
|
||||
public function getIdentifier(): string {
|
||||
return 'deck';
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class Filter implements \OCP\Activity\IFilter {
|
||||
* @return string A translated string
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getName() {
|
||||
public function getName(): string {
|
||||
return $this->l10n->t('Deck');
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class Filter implements \OCP\Activity\IFilter {
|
||||
* priority values. It is required to return a value between 0 and 100.
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getPriority() {
|
||||
public function getPriority(): int {
|
||||
return 90;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class Filter implements \OCP\Activity\IFilter {
|
||||
* @return string Full URL to an icon, empty string when none is given
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getIcon() {
|
||||
public function getIcon(): string {
|
||||
return $this->urlGenerator->imagePath('deck', 'deck-dark.svg');
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class Filter implements \OCP\Activity\IFilter {
|
||||
* @return string[] An array of allowed apps from which activities should be displayed
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function filterTypes(array $types) {
|
||||
public function filterTypes(array $types): array {
|
||||
return array_merge($types, ['deck_comment']);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class Filter implements \OCP\Activity\IFilter {
|
||||
* @return string[] An array of allowed apps from which activities should be displayed
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function allowedApps() {
|
||||
public function allowedApps(): array {
|
||||
return ['deck'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user