From 011d148e33092db7ce87aebdbef9fe575e723f0b Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 8 Sep 2025 07:54:44 +0200 Subject: [PATCH] #451 PHPStan level 5 --- lam/lib/baseModule.inc | 2 ++ lam/lib/modules/freeRadius.inc | 15 ++------------- lam/lib/modules/shadowAccount.inc | 11 ++++------- lam/lib/modules/windowsUser.inc | 7 ++----- phpstan.neon | 1 + 5 files changed, 11 insertions(+), 25 deletions(-) diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index b3c49cf96..764b8d11f 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -1,5 +1,6 @@ isBooleanConfigOptionSet('windowsUser_hideroomnumber', true)) { $this->mapSimpleUploadField($rawAccounts, $ids, $partialAccounts, $i, 'windowsUser_roomNumber', - 'roomnumber', null, null, $errors, '/;[ ]*/'); + 'roomnumber', null, [], $errors, '/;[ ]*/'); } // carLicense if (!$this->isBooleanConfigOptionSet('windowsUser_hidecarLicense', true)) { @@ -4627,10 +4627,7 @@ class windowsUser extends baseModule implements passwordService, AccountStatusPr } /** - * Returns a list of jobs that can be run. - * - * @param LAMConfig $config configuration - * @return array list of jobs + * {@inheritDoc} */ public function getSupportedJobs(&$config) { return [ diff --git a/phpstan.neon b/phpstan.neon index b5a9f5ed4..5b1fcb6d8 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -56,6 +56,7 @@ parameters: - '#Call to .*method .* on an unknown class LAM\\DB\\CronDatabase.*#' - '#.* has invalid type LAM\\ENV\\.*#' - '#.* has invalid type LAM\\DB\\.*#' + - '#.* has invalid return type LAM\\JOB\\.*#' - '#Call to an undefined method baseModule::getBackupEmail\(\).#' - '#Call to an undefined method baseModule::getMembers\(\).#' - '#Call to an undefined method baseModule::getNextGIDs\(\).#'