Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberroland committed Dec 19, 2023
1 parent 91d0d2e commit ee8467e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lam/lib/modules.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ class accountContainer {
if ($_SESSION['config']->getLamProMailAllowAlternateAddress() != 'false') {
$alternateMail = '';
$pwdResetModule = $this->getAccountModule('passwordSelfReset');
if (!empty($pwdResetModule)) {
if ($pwdResetModule !== null) {
$backupMail = $pwdResetModule->getBackupEmail();
if (!empty($backupMail)) {
$alternateMail = $pwdResetModule->getBackupEmail();
Expand Down
5 changes: 3 additions & 2 deletions lam/lib/modules/imapAccess.inc
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ class imapAccess extends baseModule {
* Extracts user name and email address from inetOrgPerson/posixAccount/windowsUser modules.
*
* @param array $attrs LDAP attributes (retrieved from other account modules if empty)
* @return htmlStatusMessage message if any
* @return ?htmlStatusMessage message if any
*/
private function extractUserAndEmail($attrs = null) {
private function extractUserAndEmail($attrs = null): ?htmlStatusMessage {
$this->email = '';
if ($attrs === null) {
if ($this->getAccountContainer()->getAccountModule('inetOrgPerson') != null) {
Expand Down Expand Up @@ -211,6 +211,7 @@ class imapAccess extends baseModule {
$modName = ($this->getAccountContainer()->getAccountModule('inetOrgPerson') != null) ? 'inetOrgPerson' : 'windowsUser';
return new htmlStatusMessage('INFO', _("Please enter an email address on this page: %s"), '', array($this->getAccountContainer()->getAccountModule($modName)->get_alias()));
}
return null;
}

/**
Expand Down
10 changes: 5 additions & 5 deletions lam/lib/pdfstruct.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use function LAM\PERSISTENCE\dbTableExists;
/*
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2003 - 2006 Michael Duergner
2011 - 2022 Roland Gruber
2011 - 2023 Roland Gruber
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -1452,9 +1452,9 @@ class PDFStructure {
/**
* Returns the logo file path.
*
* @return string logo
* @return ?string logo
*/
public function getLogo() {
public function getLogo(): ?string {
return $this->logo;
}

Expand Down Expand Up @@ -1488,9 +1488,9 @@ class PDFStructure {
/**
* Returns if to print folding marks.
*
* @return string print folding marks
* @return ?string print folding marks
*/
public function getFoldingMarks() {
public function getFoldingMarks(): ?string {
return $this->foldingMarks;
}

Expand Down

0 comments on commit ee8467e

Please sign in to comment.