Code Duplication    Length = 10-10 lines in 2 locations

cloudcontrol/library/components/CmsComponent.php 2 locations

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