Code Duplication    Length = 4-4 lines in 2 locations

apps/accessibility/lib/Controller/ConfigController.php 2 locations

@@ 101-104 (lines=4) @@
98
			$themes = $this->accessibilityProvider->getThemes();
99
			$fonts  = $this->accessibilityProvider->getFonts();
100
101
			if ($value === false) {
102
				$this->config->deleteUserValue($this->userSession->getUser()->getUID(), $this->appName, $key);
103
				return new DataResponse();
104
			}
105
106
			$availableOptions = array_map(function($option) {
107
				return $option['id'];
@@ 110-113 (lines=4) @@
107
				return $option['id'];
108
			}, array_merge($themes, $fonts));
109
110
			if (in_array($value, $availableOptions)) {
111
				$this->config->setUserValue($this->userSession->getUser()->getUID(), $this->appName, $key, $value);
112
				return new DataResponse();
113
			}
114
115
			throw new OCSBadRequestException('Invalid value: ' . $value);
116
		}