Sync: drop obsolete/useless method

This commit is contained in:
Thomas Gelf 2023-08-22 10:32:19 +02:00
parent 8896e54d69
commit e94ad714fb
1 changed files with 2 additions and 21 deletions

View File

@ -136,24 +136,6 @@ class Sync
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
*
@ -578,10 +560,9 @@ class Sync
$varName = substr($prop, 5);
if (substr($varName, -2) === '[]') {
$varName = substr($varName, 0, -2);
$current = $this->wantArray($object->vars()->$varName);
$object->vars()->$varName = array_merge(
$current,
$this->wantArray($val)
(array) ($object->vars()->$varName),
(array) $val
);
} else {
if ($val === null) {