Code Duplication    Length = 10-10 lines in 2 locations

src/components/CmsComponent.php 2 locations

@@ 172-181 (lines=10) @@
169
         *
170
         * @throws \Exception
171
         */
172
        private function checkWhiteList($remoteAddress)
173
        {
174
            if (isset($this->parameters[self::PARAMETER_WHITELIST_IPS])) {
175
                $whitelistIps = explode(',', $this->parameters[self::PARAMETER_WHITELIST_IPS]);
176
                $whitelistIps = array_map("trim", $whitelistIps);
177
                if (!in_array($remoteAddress, $whitelistIps)) {
178
                    throw new \Exception('Ip address ' . $remoteAddress . ' is not on whitelist');
179
                }
180
            }
181
        }
182
183
        /**
184
         * @param $remoteAddress
@@ 188-197 (lines=10) @@
185
         *
186
         * @throws \Exception
187
         */
188
        private function checkBlackList($remoteAddress)
189
        {
190
            if (isset($this->parameters[self::PARAMETER_BLACKLIST_IPS])) {
191
                $blacklistIps = explode(',', $this->parameters[self::PARAMETER_BLACKLIST_IPS]);
192
                $blacklistIps = array_map("trim", $blacklistIps);
193
                if (in_array($remoteAddress, $blacklistIps)) {
194
                    throw new \Exception('Ip address ' . $remoteAddress . ' is on blacklist');
195
                }
196
            }
197
        }
198
199
        /**
200
         * @param $request