Merge pull request #2994 from MacDada/JsonConfigSourceFuncMadePrivate

JsonConfigSource: arrayUnshiftRef(): visibility and naming
main
Jordi Boggiano 10 years ago
commit fc57c97f9f

@ -166,7 +166,7 @@ class JsonConfigSource implements ConfigSourceInterface
} else { } else {
// on failed clean update, call the fallback and rewrite the whole file // on failed clean update, call the fallback and rewrite the whole file
$config = $this->file->read(); $config = $this->file->read();
$this->array_unshift_ref($args, $config); $this->arrayUnshiftRef($args, $config);
call_user_func_array($fallback, $args); call_user_func_array($fallback, $args);
$this->file->write($config); $this->file->write($config);
} }
@ -183,7 +183,7 @@ class JsonConfigSource implements ConfigSourceInterface
* @param mixed $value * @param mixed $value
* @return array * @return array
*/ */
function array_unshift_ref(&$array, &$value) private function arrayUnshiftRef(&$array, &$value)
{ {
$return = array_unshift($array, ''); $return = array_unshift($array, '');
$array[0] =& $value; $array[0] =& $value;

Loading…
Cancel
Save