Code Duplication    Length = 10-10 lines in 2 locations

cloudcontrol/library/components/CmsComponent.php 2 locations

@@ 189-198 (lines=10) @@
186
         * @param $remoteAddress
187
         * @throws \Exception
188
         */
189
        private function checkWhiteList($remoteAddress)
190
        {
191
            if (isset($this->parameters[self::PARAMETER_WHITELIST_IPS])) {
192
                $whitelistIps = explode(',', $this->parameters[self::PARAMETER_WHITELIST_IPS]);
193
                $whitelistIps = array_map("trim", $whitelistIps);
194
                if (!in_array($remoteAddress, $whitelistIps)) {
195
                    throw new \Exception('Ip address ' . $remoteAddress . ' is not on whitelist');
196
                }
197
            }
198
        }
199
200
        /**
201
         * @param $remoteAddress
@@ 204-213 (lines=10) @@
201
         * @param $remoteAddress
202
         * @throws \Exception
203
         */
204
        private function checkBlackList($remoteAddress)
205
        {
206
            if (isset($this->parameters[self::PARAMETER_BLACKLIST_IPS])) {
207
                $blacklistIps = explode(',', $this->parameters[self::PARAMETER_BLACKLIST_IPS]);
208
                $blacklistIps = array_map("trim", $blacklistIps);
209
                if (in_array($remoteAddress, $blacklistIps)) {
210
                    throw new \Exception('Ip address ' . $remoteAddress . ' is on blacklist');
211
                }
212
            }
213
        }
214
215
        /**
216
         * @param $request