mirror of
https://github.com/LDAPAccountManager/lam.git
synced 2025-10-03 01:39:33 +02:00
#451 PHPStan level 5
This commit is contained in:
parent
b054c2bd02
commit
a133fc09c5
4 changed files with 10 additions and 10 deletions
|
@ -1771,7 +1771,7 @@ abstract class baseModule {
|
|||
$field->setFieldSize(null);
|
||||
}
|
||||
elseif ($isTextArea && !in_array($name, $readOnlyFields)) {
|
||||
$field = new htmlInputTextarea(static::class . '_' . $name, $value, null, null);
|
||||
$field = new htmlInputTextarea(static::class . '_' . $name, $value, 100, 3);
|
||||
}
|
||||
elseif (!$isTextArea) {
|
||||
$field = new htmlOutputText($value);
|
||||
|
|
|
@ -3190,7 +3190,7 @@ class LAMCfgMain {
|
|||
@chmod($fileName, 0600);
|
||||
}
|
||||
else {
|
||||
throw new LAMException(printf(_('Unable to write file %s.'), $fileName));
|
||||
throw new LAMException(sprintf(_('Unable to write file %s.'), $fileName));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3268,11 +3268,11 @@ class LAMCfgMain {
|
|||
}
|
||||
catch (PDOException $e) {
|
||||
syslog(LOG_ERR, 'Unable to read main config: ' . $e->getMessage());
|
||||
throw new LAMException(_('Unable to connect to configuration database.'), null, $e);
|
||||
throw new LAMException(_('Unable to connect to configuration database.'), '', $e);
|
||||
}
|
||||
catch (LAMException $e) {
|
||||
syslog(LOG_ERR, 'Unable to import main config: ' . $e->getMessage());
|
||||
throw new LAMException(_('Unable to connect to configuration database.'), null, $e);
|
||||
throw new LAMException(_('Unable to connect to configuration database.'), '', $e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -140,10 +140,10 @@ class CronRunner {
|
|||
$pdo = $cronDatabase->getPdo();
|
||||
}
|
||||
catch (PDOException $e) {
|
||||
throw new LAMException("Unable to connect to database. " . $e->getMessage(), null, $e);
|
||||
throw new LAMException("Unable to connect to database. " . $e->getMessage(), '', $e);
|
||||
}
|
||||
catch (LAMException $e) {
|
||||
throw new LAMException("Unable to connect to database. " . $e->getTitle(), null, $e);
|
||||
throw new LAMException("Unable to connect to database. " . $e->getTitle(), '', $e);
|
||||
}
|
||||
// get jobs to run
|
||||
if (empty($cronDatabase->getJobs())) {
|
||||
|
|
|
@ -1286,7 +1286,7 @@ class htmlSelect extends htmlElement {
|
|||
if ($selectedElements != null) {
|
||||
$this->selectedElements = $selectedElements;
|
||||
}
|
||||
$this->size = htmlspecialchars($size);
|
||||
$this->size = htmlspecialchars((string) $size);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2374,8 +2374,8 @@ class htmlInputTextarea extends htmlElement {
|
|||
function __construct($name, $value, $colCount, $rowCount) {
|
||||
$this->name = htmlspecialchars($name);
|
||||
$this->value = htmlspecialchars($value);
|
||||
$this->colCount = htmlspecialchars($colCount);
|
||||
$this->rowCount = htmlspecialchars($rowCount);
|
||||
$this->colCount = htmlspecialchars((string) $colCount);
|
||||
$this->rowCount = htmlspecialchars((string) $rowCount);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4900,7 +4900,7 @@ class htmlProgressbar extends htmlElement {
|
|||
*/
|
||||
function __construct(string $id = null, int $progress = 0) {
|
||||
$this->id = htmlspecialchars($id);
|
||||
$this->progress = htmlspecialchars($progress);
|
||||
$this->progress = htmlspecialchars((string) $progress);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue