Skip to content

Commit

Permalink
Merge pull request #25998 from nextcloud/techdept/psalm/personalsettings
Browse files Browse the repository at this point in the history
Fix some types in the Settings Personal pages
  • Loading branch information
rullzer authored Mar 9, 2021
2 parents 05b5715 + e44be83 commit f5da1ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions apps/settings/lib/Settings/Personal/Additional.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ class Additional implements ISettings {
* @return TemplateResponse returns the instance with all parameters set, ready to be rendered
* @since 9.1
*/
public function getForm() {
public function getForm(): TemplateResponse {
return new TemplateResponse('settings', 'settings/empty');
}

/**
* @return string the section ID, e.g. 'sharing'
* @since 9.1
*/
public function getSection() {
public function getSection(): string {
return 'additional';
}

Expand All @@ -53,7 +53,7 @@ public function getSection() {
* E.g.: 70
* @since 9.1
*/
public function getPriority() {
return '5';
public function getPriority(): int {
return 5;
}
}
8 changes: 4 additions & 4 deletions apps/settings/lib/Settings/Personal/ServerDevNotice.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function __construct(IRegistry $registry,
/**
* @return TemplateResponse
*/
public function getForm() {
public function getForm(): TemplateResponse {
$userFolder = $this->rootFolder->getUserFolder($this->userSession->getUser()->getUID());

$hasInitialState = false;
Expand All @@ -98,9 +98,9 @@ public function getForm() {
}

/**
* @return string the section ID, e.g. 'sharing'
* @return string|null the section ID, e.g. 'sharing'
*/
public function getSection() {
public function getSection(): ?string {
if ($this->registry->delegateHasValidSubscription()) {
return null;
}
Expand All @@ -115,7 +115,7 @@ public function getSection() {
*
* E.g.: 70
*/
public function getPriority() {
public function getPriority(): int {
return 1000;
}
}

0 comments on commit f5da1ec

Please sign in to comment.