mirror of
https://github.com/LDAPAccountManager/lam.git
synced 2025-10-03 09:49:16 +02:00
#451 PHPStan level 5
This commit is contained in:
parent
e55a4f607c
commit
45702a54a8
3 changed files with 7 additions and 5 deletions
|
@ -483,16 +483,18 @@ function dryRun(): array {
|
||||||
* @param string $errstr error message
|
* @param string $errstr error message
|
||||||
* @param string $errfile error file
|
* @param string $errfile error file
|
||||||
* @param int $errline error line
|
* @param int $errline error line
|
||||||
|
* @return bool stop internal error handler
|
||||||
*/
|
*/
|
||||||
function multiEditLdapErrorHandler($errno, $errstr, $errfile, $errline): void {
|
function multiEditLdapErrorHandler($errno, $errstr, $errfile, $errline): bool {
|
||||||
if ($errno === E_USER_ERROR) {
|
if (($errno === E_USER_ERROR) || ($errno === E_ERROR)) {
|
||||||
logNewMessage(LOG_ERR, 'Error occurred: ' . $errstr . " ($errfile: $errline)");
|
logNewMessage(LOG_ERR, 'Error occurred: ' . $errstr . " ($errfile: $errline)");
|
||||||
$_REQUEST['multiEdit_error'] = true;
|
$_REQUEST['multiEdit_error'] = true;
|
||||||
}
|
}
|
||||||
elseif ($errno === E_USER_WARNING) {
|
elseif (($errno === E_USER_WARNING) || ($errno === E_WARNING)) {
|
||||||
logNewMessage(LOG_WARNING, 'Error occurred: ' . $errstr . " ($errfile: $errline)");
|
logNewMessage(LOG_WARNING, 'Error occurred: ' . $errstr . " ($errfile: $errline)");
|
||||||
$_REQUEST['multiEdit_error'] = true;
|
$_REQUEST['multiEdit_error'] = true;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -343,7 +343,7 @@ elseif (isset($monitorEntries['cn=monitor']['opsinitiated'])) {
|
||||||
$container->addLabel(new htmlOutputText('<b>' . _("Bind") . '</b>', false));
|
$container->addLabel(new htmlOutputText('<b>' . _("Bind") . '</b>', false));
|
||||||
$binds = $monitorEntries['cn=snmp,cn=monitor']['anonymousbinds'][0] + $monitorEntries['cn=snmp,cn=monitor']['unauthbinds'][0]
|
$binds = $monitorEntries['cn=snmp,cn=monitor']['anonymousbinds'][0] + $monitorEntries['cn=snmp,cn=monitor']['unauthbinds'][0]
|
||||||
+ $monitorEntries['cn=snmp,cn=monitor']['simpleauthbinds'][0] + $monitorEntries['cn=snmp,cn=monitor']['strongauthbinds'][0];
|
+ $monitorEntries['cn=snmp,cn=monitor']['simpleauthbinds'][0] + $monitorEntries['cn=snmp,cn=monitor']['strongauthbinds'][0];
|
||||||
$container->addField(new htmlOutputText($binds));
|
$container->addField(new htmlOutputText((string) $binds));
|
||||||
$container->addLabel(new htmlOutputText('<b>' . _("Search") . '</b>', false));
|
$container->addLabel(new htmlOutputText('<b>' . _("Search") . '</b>', false));
|
||||||
$searches = $monitorEntries['cn=snmp,cn=monitor']['searchops'][0];
|
$searches = $monitorEntries['cn=snmp,cn=monitor']['searchops'][0];
|
||||||
$container->addField(new htmlOutputText($searches));
|
$container->addField(new htmlOutputText($searches));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
parameters:
|
parameters:
|
||||||
level: 4
|
level: 5
|
||||||
scanDirectories:
|
scanDirectories:
|
||||||
- lam/lib
|
- lam/lib
|
||||||
- lam/templates
|
- lam/templates
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue