#451 PHPStan level 5

This commit is contained in:
Roland Gruber 2025-09-06 09:49:39 +02:00
parent 4c8f3434fc
commit 3c005187ea
2 changed files with 6 additions and 14 deletions

View file

@ -5277,8 +5277,8 @@ if (interface_exists('\LAM\JOB\Job', false)) {
/** /**
* Returns if the job should run. * Returns if the job should run.
* *
* @param $pdo PDO * @param PDO $pdo PDO
* @param $jobId job id * @param string $jobId job id
* @param DateTime $baseDate base date * @param DateTime $baseDate base date
* @param int $monthInterval month interval * @param int $monthInterval month interval
* @return bool should run * @return bool should run
@ -5512,15 +5512,7 @@ if (interface_exists('\LAM\JOB\Job', false)) {
} }
/** /**
* Checks if a user is expired. * {@inheritDoc}
*
* @param integer $jobID job ID
* @param array $options job settings
* @param PDO $pdo PDO
* @param DateTime $now current time
* @param array $policyOptions list of policy options by getPolicyOptions()
* @param array $user user attributes
* @param boolean $isDryRun just do a dry run, nothing is modified
*/ */
protected function checkSingleUser($jobID, $options, &$pdo, $now, $policyOptions, $user, $isDryRun) { protected function checkSingleUser($jobID, $options, &$pdo, $now, $policyOptions, $user, $isDryRun) {
$seconds = substr($user['accountexpires'][0], 0, -7); $seconds = substr($user['accountexpires'][0], 0, -7);

View file

@ -342,7 +342,7 @@ class ConfigDataImporter {
$steps[] = new ImporterStep(_('General settings'), 'mainConfig', $value); $steps[] = new ImporterStep(_('General settings'), 'mainConfig', $value);
break; break;
case 'certificates': case 'certificates':
$steps[] = new ImporterStep(_('SSL certificates'), 'certificates', $value); $steps[] = new ImporterStep(_('SSL certificates'), 'certificates', [$value]);
break; break;
case 'serverProfiles': case 'serverProfiles':
$mainStep = new ImporterStep(_('Server profiles'), 'serverProfiles', $value); $mainStep = new ImporterStep(_('Server profiles'), 'serverProfiles', $value);
@ -424,7 +424,7 @@ class ConfigDataImporter {
* Runs the actual import. * Runs the actual import.
* *
* @param ImporterStep[] $steps import steps * @param ImporterStep[] $steps import steps
* @throws LAMException if error occurred * @throws LAMException if an error occurred
*/ */
public function runImport($steps) { public function runImport($steps) {
foreach ($steps as $step) { foreach ($steps as $step) {
@ -434,7 +434,7 @@ class ConfigDataImporter {
$key = $step->getKey(); $key = $step->getKey();
match ($key) { match ($key) {
'mainConfig' => $this->importMainConfig($step->getValue()), 'mainConfig' => $this->importMainConfig($step->getValue()),
'certificates' => $this->importCertificates($step->getValue()), 'certificates' => $this->importCertificates($step->getValue()[0]),
'serverProfiles' => $this->importServerProfiles($step), 'serverProfiles' => $this->importServerProfiles($step),
'accountProfiles' => $this->importAccountProfiles($step), 'accountProfiles' => $this->importAccountProfiles($step),
'accountProfileTemplates' => $this->importAccountProfileTemplates($step), 'accountProfileTemplates' => $this->importAccountProfileTemplates($step),