Code Duplication    Length = 7-7 lines in 2 locations

lib/Controller/Settings.php 2 locations

@@ 107-113 (lines=7) @@
104
		$types = $this->data->getNotificationTypes($this->l10n);
105
106
		foreach ($types as $type => $data) {
107
			if (!\is_array($data) || (isset($data['methods']) && \in_array(IExtension::METHOD_MAIL, $data['methods']))) {
108
				$this->config->setUserValue(
109
					$this->user->getUID(), 'activity',
110
					'notify_email_' . $type,
111
					(int) $this->request->getParam($type . '_email', false)
112
				);
113
			}
114
115
			if (!\is_array($data) || (isset($data['methods']) && \in_array(IExtension::METHOD_STREAM, $data['methods']))) {
116
				$this->config->setUserValue(
@@ 115-121 (lines=7) @@
112
				);
113
			}
114
115
			if (!\is_array($data) || (isset($data['methods']) && \in_array(IExtension::METHOD_STREAM, $data['methods']))) {
116
				$this->config->setUserValue(
117
					$this->user->getUID(), 'activity',
118
					'notify_stream_' . $type,
119
					(int) $this->request->getParam($type . '_stream', false)
120
				);
121
			}
122
		}
123
124
		$email_batch_time = 3600;