mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
add some php 7+ array type hints.
This commit is contained in:
parent
1c0fd02323
commit
3303f25bcc
@ -254,7 +254,7 @@ class AliasHandler extends PFAHandler {
|
||||
}
|
||||
}
|
||||
|
||||
protected function setmore($values) {
|
||||
protected function setmore(array $values) {
|
||||
if ($this->new) {
|
||||
if ($this->struct['address']['display_in_form'] == 1) { # default mode - split off 'domain' field from 'address' # TODO: do this unconditional?
|
||||
list(/*NULL*/, $domain) = explode('@', $values['address']);
|
||||
|
@ -85,7 +85,7 @@ class FetchmailHandler extends PFAHandler {
|
||||
}
|
||||
|
||||
|
||||
protected function setmore($values) {
|
||||
protected function setmore(array $values) {
|
||||
# set domain based on the target mailbox
|
||||
if ($this->new || isset($values['mailbox'])) {
|
||||
list(/*NULL*/, $domain) = explode('@', $values['mailbox']);
|
||||
|
@ -273,7 +273,7 @@ class MailboxHandler extends PFAHandler {
|
||||
|
||||
|
||||
// Could perhaps also use _validate_local_part($new_value) { .... }
|
||||
public function set($values) {
|
||||
public function set(array $values) {
|
||||
// See: https://github.com/postfixadmin/postfixadmin/issues/282 - ensure the 'local_part' does not contain an @ sign.
|
||||
$ok = true;
|
||||
if (isset($values['local_part']) && strpos($values['local_part'], '@')) {
|
||||
|
@ -418,7 +418,7 @@ abstract class PFAHandler {
|
||||
* @return bool - true if all values are valid, otherwise false
|
||||
* error messages (if any) are stored in $this->errormsg
|
||||
*/
|
||||
public function set($values) {
|
||||
public function set(array $values) {
|
||||
if (!$this->can_edit) {
|
||||
$this->errormsg[] = Config::Lang_f('edit_not_allowed', $this->label);
|
||||
return false;
|
||||
@ -521,7 +521,7 @@ abstract class PFAHandler {
|
||||
* can be used to update additional columns etc.
|
||||
* hint: modify $this->values and $this->errormsg directly as needed
|
||||
*/
|
||||
protected function setmore($values) {
|
||||
protected function setmore(array $values) {
|
||||
# do nothing
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user