public static function append($storage, $data = [])
    {
        if (!is_array($storage) || !is_array($data)) {
            throw new ArrayStorageException('Invalid parameters specified');
        }
        foreach ($data as $setting => $value) {
            if (array_key_exists($setting, $storage) &&
                is_array($storage[$setting]) &&
                is_array($value)
            ) {
                $storage[$setting] = self::append($storage[$setting], $value);
            } else {
                $storage[$setting] = $value;
            }
        }
        return $storage;
    }
public static function append($storage, $data = [])
    {
        if (!is_array($storage) || !is_array($data)) {
            throw new ArrayStorageException('Invalid parameters specified');
        }
        foreach ($data as $setting => $value) {
            if (array_key_exists($setting, $storage) &&
                is_array($storage[$setting]) &&
                is_array($value)
            ) {
                $storage[$setting] = self::append($storage[$setting], $value);
            } else {
                $storage[$setting] = $value;
            }
        }
        return $storage;
    }
public static function append ( $ storage , $ data = [ ] ) { if ( ! is_array ( $ storage ) || ! is_array ( $ data ) ) { throw new ArrayStorageException ( 'Invalid parameters specified' ) ; } foreach ( $ data as $ setting => $ value ) { if ( array_key_exists ( $ setting , $ storage ) && is_array ( $ storage [ $ setting ] ) && is_array ( $ value ) ) { $ storage [ $ setting ] = self :: append ( $ storage [ $ setting ] , $ value ) ; } else { $ storage [ $ setting ] = $ value ; } } return $ storage ; }
Append data to a storage array.

@param array $storage
@param mixed $data
@return array
@throws \WebServCo\Framework\Exceptions\ArrayStorageException
Append data to a storage array .