Code Duplication    Length = 6-6 lines in 2 locations

lib/Service/AppConfigService.php 2 locations

@@ 88-93 (lines=6) @@
85
				throw new NotFoundException ( $this->l10n->t ( 'The redis host is not specified in the correct format.' ) );
86
			}
87
		}
88
		if ($key === OcrConstants::REDIS_CONFIG_KEY_PORT) {
89
			$value = intval ( $value );
90
			if (! ($value > 0 && $value < 65535)) {
91
				throw new NotFoundException ( $this->l10n->t ( 'The redis port number is not specified in the correct format.' ) );
92
			}
93
		}
94
		if ($key === OcrConstants::REDIS_CONFIG_KEY_DB) {
95
			$value = intval ( $value );
96
			if (! ($value >= 0)) {
@@ 94-99 (lines=6) @@
91
				throw new NotFoundException ( $this->l10n->t ( 'The redis port number is not specified in the correct format.' ) );
92
			}
93
		}
94
		if ($key === OcrConstants::REDIS_CONFIG_KEY_DB) {
95
			$value = intval ( $value );
96
			if (! ($value >= 0)) {
97
				throw new NotFoundException ( $this->l10n->t ( 'The redis db is not specified in the correct format.' ) );
98
			}
99
		}
100
		return $this->config->setAppValue ( $this->appName, $key, $value );
101
	}
102
}