You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-07-31 10:04:20 +03:00
psalm fixes
This commit is contained in:
@ -183,7 +183,7 @@ class AdminHandler extends PFAHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true on success false on failure
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function delete() {
|
public function delete() {
|
||||||
if (! $this->view()) {
|
if (! $this->view()) {
|
||||||
|
@ -440,6 +440,7 @@ class AliasHandler extends PFAHandler {
|
|||||||
* Returns the vacation alias for this user.
|
* 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
|
* 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
|
* autoreply.fish.net in config.inc.php we'd return roger#example.com@autoreply.fish.net
|
||||||
|
*
|
||||||
* @return string an email alias.
|
* @return string an email alias.
|
||||||
*/
|
*/
|
||||||
protected function getVacationAlias() {
|
protected function getVacationAlias() {
|
||||||
@ -448,7 +449,7 @@ class AliasHandler extends PFAHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true on success false on failure
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function delete() {
|
public function delete() {
|
||||||
if (! $this->view()) {
|
if (! $this->view()) {
|
||||||
|
@ -100,7 +100,7 @@ class AliasdomainHandler extends PFAHandler {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true on success false on failure
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function delete() {
|
public function delete() {
|
||||||
if (! $this->view()) {
|
if (! $this->view()) {
|
||||||
@ -118,6 +118,7 @@ class AliasdomainHandler extends PFAHandler {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* validate target_domain field - it must be != $this->id to avoid a loop
|
* validate target_domain field - it must be != $this->id to avoid a loop
|
||||||
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
protected function _validate_target_domain($field, $val) {
|
protected function _validate_target_domain($field, $val) {
|
||||||
if ($val == $this->id) {
|
if ($val == $this->id) {
|
||||||
|
@ -191,7 +191,7 @@ class DomainHandler extends PFAHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true on success false on failure
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function delete() {
|
public function delete() {
|
||||||
# TODO: check for _can_delete instead
|
# TODO: check for _can_delete instead
|
||||||
|
@ -107,7 +107,7 @@ class FetchmailHandler extends PFAHandler {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return true on success false on failure
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function delete() {
|
public function delete() {
|
||||||
if (! $this->view()) {
|
if (! $this->view()) {
|
||||||
@ -124,7 +124,7 @@ class FetchmailHandler extends PFAHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* validate src_server - must be non-empty and survive check_domain()
|
* validate src_server - must be non-empty and survive check_domain()
|
||||||
*/
|
*/
|
||||||
protected function _validate_src_server($field, $val) {
|
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
|
* validate src_user and src_password - must be non-empty
|
||||||
* (we can't assume anything about valid usernames and passwords on remote
|
* (we can't assume anything about valid usernames and passwords on remote
|
||||||
* servers, so the validation can't be more strict)
|
* servers, so the validation can't be more strict)
|
||||||
@ -154,6 +154,7 @@ class FetchmailHandler extends PFAHandler {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function _validate_src_password($field, $val) {
|
protected function _validate_src_password($field, $val) {
|
||||||
if ($val == '') {
|
if ($val == '') {
|
||||||
$this->errormsg[$field] = Config::lang('pFetchmail_password_missing');
|
$this->errormsg[$field] = Config::lang('pFetchmail_password_missing');
|
||||||
@ -162,7 +163,7 @@ class FetchmailHandler extends PFAHandler {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* validate poll interval - must be numeri and > 0
|
* validate poll interval - must be numeri and > 0
|
||||||
*/
|
*/
|
||||||
protected function _validate_poll_time($field, $val) {
|
protected function _validate_poll_time($field, $val) {
|
||||||
|
@ -790,11 +790,11 @@ abstract class PFAHandler {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* get a list of one or more items with all values
|
* 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
|
* 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 array $searchmode - modes to use if $condition is an array - see read_from_db for details
|
||||||
* @param integer limit - maximum number of rows to return
|
* @param int $limit - maximum number of rows to return
|
||||||
* @param integer offset - number of first row 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)
|
* @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)
|
* The data is stored in $this->result (as array of rows, each row is an associative array of column => value)
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user