mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
Sync: drop obsolete/useless method
This commit is contained in:
parent
8896e54d69
commit
e94ad714fb
@ -136,24 +136,6 @@ class Sync
|
|||||||
return $modified;
|
return $modified;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Transform the given value to an array
|
|
||||||
*
|
|
||||||
* @param array|string|null $value
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
protected function wantArray($value)
|
|
||||||
{
|
|
||||||
if (is_array($value)) {
|
|
||||||
return $value;
|
|
||||||
} elseif ($value === null) {
|
|
||||||
return [];
|
|
||||||
} else {
|
|
||||||
return [$value];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Raise PHP resource limits
|
* Raise PHP resource limits
|
||||||
*
|
*
|
||||||
@ -578,10 +560,9 @@ class Sync
|
|||||||
$varName = substr($prop, 5);
|
$varName = substr($prop, 5);
|
||||||
if (substr($varName, -2) === '[]') {
|
if (substr($varName, -2) === '[]') {
|
||||||
$varName = substr($varName, 0, -2);
|
$varName = substr($varName, 0, -2);
|
||||||
$current = $this->wantArray($object->vars()->$varName);
|
|
||||||
$object->vars()->$varName = array_merge(
|
$object->vars()->$varName = array_merge(
|
||||||
$current,
|
(array) ($object->vars()->$varName),
|
||||||
$this->wantArray($val)
|
(array) $val
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if ($val === null) {
|
if ($val === null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user