Code Duplication    Length = 17-17 lines in 2 locations

lib/Controller/Settings.php 2 locations

@@ 108-124 (lines=17) @@
105
			$notify_setting_selfemail = false) {
106
107
		$settings = $this->manager->getSettings();
108
		foreach ($settings as $setting) {
109
			if ($setting->canChangeStream()) {
110
				$this->config->setUserValue(
111
					$this->user, 'activity',
112
					'notify_stream_' . $setting->getIdentifier(),
113
					(int) $this->request->getParam($setting->getIdentifier() . '_stream', false)
114
				);
115
			}
116
117
			if ($setting->canChangeMail()) {
118
				$this->config->setUserValue(
119
					$this->user, 'activity',
120
					'notify_email_' . $setting->getIdentifier(),
121
					(int) $this->request->getParam($setting->getIdentifier() . '_email', false)
122
				);
123
			}
124
		}
125
126
		$email_batch_time = 3600;
127
		if ($notify_setting_batchtime === UserSettings::EMAIL_SEND_DAILY) {
@@ 168-184 (lines=17) @@
165
			$notify_setting_selfemail = false) {
166
167
		$settings = $this->manager->getSettings();
168
		foreach ($settings as $setting) {
169
			if ($setting->canChangeStream()) {
170
				$this->config->setAppValue(
171
					'activity',
172
					'notify_stream_' . $setting->getIdentifier(),
173
					(int) $this->request->getParam($setting->getIdentifier() . '_stream', false)
174
				);
175
			}
176
177
			if ($setting->canChangeMail()) {
178
				$this->config->setAppValue(
179
					'activity',
180
					'notify_email_' . $setting->getIdentifier(),
181
					(int) $this->request->getParam($setting->getIdentifier() . '_email', false)
182
				);
183
			}
184
		}
185
186
		$email_batch_time = 3600;
187
		if ($notify_setting_batchtime === UserSettings::EMAIL_SEND_DAILY) {