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) {
@@ 170-186 (lines=17) @@
167
			$notify_setting_selfemail = false) {
168
169
		$settings = $this->manager->getSettings();
170
		foreach ($settings as $setting) {
171
			if ($setting->canChangeStream()) {
172
				$this->config->setAppValue(
173
					'activity',
174
					'notify_stream_' . $setting->getIdentifier(),
175
					(int) $this->request->getParam($setting->getIdentifier() . '_stream', false)
176
				);
177
			}
178
179
			if ($setting->canChangeMail()) {
180
				$this->config->setAppValue(
181
					'activity',
182
					'notify_email_' . $setting->getIdentifier(),
183
					(int) $this->request->getParam($setting->getIdentifier() . '_email', false)
184
				);
185
			}
186
		}
187
188
		$email_batch_time = 3600;
189
		if ($notify_setting_batchtime === UserSettings::EMAIL_SEND_DAILY) {