1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-31 10:04:20 +03:00

psalm fixes

This commit is contained in:
David Goodwin
2020-06-21 16:44:43 +01:00
parent ca24ff8300
commit e8f27969a3
6 changed files with 15 additions and 12 deletions

View File

@ -183,7 +183,7 @@ class AdminHandler extends PFAHandler {
}
/**
* @return true on success false on failure
* @return bool
*/
public function delete() {
if (! $this->view()) {

View File

@ -440,6 +440,7 @@ class AliasHandler extends PFAHandler {
* Returns the vacation alias for this user.
* i.e. if this user's username was roger@example.com, and the autoreply domain was set to
* autoreply.fish.net in config.inc.php we'd return roger#example.com@autoreply.fish.net
*
* @return string an email alias.
*/
protected function getVacationAlias() {
@ -448,7 +449,7 @@ class AliasHandler extends PFAHandler {
}
/**
* @return true on success false on failure
* @return boolean
*/
public function delete() {
if (! $this->view()) {

View File

@ -100,7 +100,7 @@ class AliasdomainHandler extends PFAHandler {
/**
* @return true on success false on failure
* @return boolean
*/
public function delete() {
if (! $this->view()) {
@ -118,6 +118,7 @@ class AliasdomainHandler extends PFAHandler {
/**
* validate target_domain field - it must be != $this->id to avoid a loop
* @return boolean
*/
protected function _validate_target_domain($field, $val) {
if ($val == $this->id) {

View File

@ -191,7 +191,7 @@ class DomainHandler extends PFAHandler {
}
/**
* @return true on success false on failure
* @return bool
*/
public function delete() {
# TODO: check for _can_delete instead

View File

@ -107,7 +107,7 @@ class FetchmailHandler extends PFAHandler {
/**
* @return true on success false on failure
* @return boolean
*/
public function delete() {
if (! $this->view()) {
@ -124,7 +124,7 @@ class FetchmailHandler extends PFAHandler {
}
/*
/**
* validate src_server - must be non-empty and survive check_domain()
*/
protected function _validate_src_server($field, $val) {
@ -142,7 +142,7 @@ class FetchmailHandler extends PFAHandler {
}
}
/*
/**
* validate src_user and src_password - must be non-empty
* (we can't assume anything about valid usernames and passwords on remote
* servers, so the validation can't be more strict)
@ -154,6 +154,7 @@ class FetchmailHandler extends PFAHandler {
}
return true;
}
protected function _validate_src_password($field, $val) {
if ($val == '') {
$this->errormsg[$field] = Config::lang('pFetchmail_password_missing');
@ -162,7 +163,7 @@ class FetchmailHandler extends PFAHandler {
return true;
}
/*
/**
* validate poll interval - must be numeri and > 0
*/
protected function _validate_poll_time($field, $val) {

View File

@ -790,11 +790,11 @@ abstract class PFAHandler {
/**
* get a list of one or more items with all values
* @param array or string $condition - see read_from_db for details
* @param array|string $condition - see read_from_db for details
* WARNING: will be changed to array only in the future, with an option to include a raw string inside the array
* @param array - modes to use if $condition is an array - see read_from_db for details
* @param integer limit - maximum number of rows to return
* @param integer offset - number of first row to return
* @param array $searchmode - modes to use if $condition is an array - see read_from_db for details
* @param int $limit - maximum number of rows to return
* @param int $offset - number of first row to return
* @return bool - always true, no need to check ;-) (if $result is not an array, getList die()s)
* The data is stored in $this->result (as array of rows, each row is an associative array of column => value)
*/