Code Duplication    Length = 10-10 lines in 2 locations

cloudcontrol/library/components/CmsComponent.php 2 locations

@@ 161-170 (lines=10) @@
158
		 *
159
		 * @throws \Exception
160
		 */
161
		private function checkWhiteList($remoteAddress)
162
		{
163
			if (isset($this->parameters[self::PARAMETER_WHITELIST_IPS])) {
164
				$whitelistIps = explode(',', $this->parameters[self::PARAMETER_WHITELIST_IPS]);
165
				$whitelistIps = array_map("trim", $whitelistIps);
166
				if (!in_array($remoteAddress, $whitelistIps)) {
167
					throw new \Exception('Ip address ' . $remoteAddress . ' is not on whitelist');
168
				}
169
			}
170
		}
171
172
		/**
173
		 * @param $remoteAddress
@@ 177-186 (lines=10) @@
174
		 *
175
		 * @throws \Exception
176
		 */
177
		private function checkBlackList($remoteAddress)
178
		{
179
			if (isset($this->parameters[self::PARAMETER_BLACKLIST_IPS])) {
180
				$blacklistIps = explode(',', $this->parameters[self::PARAMETER_BLACKLIST_IPS]);
181
				$blacklistIps = array_map("trim", $blacklistIps);
182
				if (in_array($remoteAddress, $blacklistIps)) {
183
					throw new \Exception('Ip address ' . $remoteAddress . ' is on blacklist');
184
				}
185
			}
186
		}
187
188
		/**
189
		 * @param $request