chore(psalm): Add type hints to make psalm happy
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -77,7 +77,7 @@ class DeckProvider implements IProvider {
|
||||
* @throws \InvalidArgumentException Should be thrown if your provider does not know this event
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function parse($language, IEvent $event, IEvent $previousEvent = null) {
|
||||
public function parse($language, IEvent $event, IEvent $previousEvent = null): IEvent {
|
||||
if ($event->getApp() !== 'deck') {
|
||||
throw new \InvalidArgumentException();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class DescriptionSetting extends Setting {
|
||||
* @return string Lowercase a-z and underscore only identifier
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getIdentifier() {
|
||||
public function getIdentifier(): string {
|
||||
return 'deck_card_description';
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class DescriptionSetting extends Setting {
|
||||
* @return string A translated string
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getName() {
|
||||
public function getName(): string {
|
||||
return $this->l->t('A <strong>card description</strong> inside the Deck app has been changed');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class Setting implements \OCP\Activity\ISetting {
|
||||
* @return string Lowercase a-z and underscore only identifier
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getIdentifier() {
|
||||
public function getIdentifier(): string {
|
||||
return 'deck';
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class Setting implements \OCP\Activity\ISetting {
|
||||
* @return string A translated string
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getName() {
|
||||
public function getName(): string {
|
||||
return $this->l->t('Changes in the <strong>Deck app</strong>');
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class Setting implements \OCP\Activity\ISetting {
|
||||
* 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;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class Setting implements \OCP\Activity\ISetting {
|
||||
* @return bool True when the option can be changed for the stream
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function canChangeStream() {
|
||||
public function canChangeStream(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class Setting implements \OCP\Activity\ISetting {
|
||||
* @return bool True when the option can be changed for the stream
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function isDefaultEnabledStream() {
|
||||
public function isDefaultEnabledStream(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ class Setting implements \OCP\Activity\ISetting {
|
||||
* @return bool True when the option can be changed for the mail
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function canChangeMail() {
|
||||
public function canChangeMail(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class Setting implements \OCP\Activity\ISetting {
|
||||
* @return bool True when the option can be changed for the stream
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function isDefaultEnabledMail() {
|
||||
public function isDefaultEnabledMail(): bool {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class SettingComment extends Setting {
|
||||
* @return string Lowercase a-z and underscore only identifier
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getIdentifier() {
|
||||
public function getIdentifier(): string {
|
||||
return 'deck_comment';
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class SettingComment extends Setting {
|
||||
* @return string A translated string
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function getName() {
|
||||
public function getName(): string {
|
||||
return $this->l->t('A <strong>comment</strong> was created on a card');
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class SettingComment extends Setting {
|
||||
* @return bool True when the option can be changed for the stream
|
||||
* @since 11.0.0
|
||||
*/
|
||||
public function canChangeStream() {
|
||||
public function canChangeStream(): bool {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,11 @@
|
||||
<code>$labelId</code>
|
||||
</ParamNameMismatch>
|
||||
</file>
|
||||
<file src="lib/Db/RelationalEntity.php">
|
||||
<MethodSignatureMismatch occurrences="1">
|
||||
<code>$attribute</code>
|
||||
</MethodSignatureMismatch>
|
||||
</file>
|
||||
<file src="lib/Db/Stack.php">
|
||||
<UndefinedClass occurrences="2">
|
||||
<code>VCalendar</code>
|
||||
|
||||
Reference in New Issue
Block a user