Code Duplication    Length = 10-10 lines in 2 locations

cloudcontrol/library/components/CmsComponent.php 2 locations

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