Code Duplication    Length = 10-10 lines in 2 locations

cloudcontrol/library/components/CmsComponent.php 2 locations

@@ 145-154 (lines=10) @@
142
		 * @param $remoteAddress
143
		 * @throws \Exception
144
         */
145
		private function checkWhiteList($remoteAddress)
146
		{
147
			if (isset($this->parameters['whitelistIps'])) {
148
				$whitelistIps = explode(',', $this->parameters['whitelistIps']);
149
				$whitelistIps = array_map("trim", $whitelistIps);
150
				if (!in_array($remoteAddress, $whitelistIps)) {
151
					throw new \Exception('Ip address ' . $remoteAddress . ' is not on whitelist');
152
				}
153
			}
154
		}
155
156
		/**
157
		 * @param $remoteAddress
@@ 160-169 (lines=10) @@
157
		 * @param $remoteAddress
158
		 * @throws \Exception
159
         */
160
		private function checkBlackList($remoteAddress)
161
		{
162
			if (isset($this->parameters['blacklistIps'])) {
163
				$blacklistIps = explode(',', $this->parameters['blacklistIps']);
164
				$blacklistIps = array_map("trim", $blacklistIps);
165
				if (in_array($remoteAddress, $blacklistIps)) {
166
					throw new \Exception('Ip address ' . $remoteAddress . ' is on blacklist');
167
				}
168
			}
169
		}
170
171
		/**
172
		 * @param $request