Code Duplication    Length = 10-10 lines in 2 locations

src/components/CmsComponent.php 2 locations

@@ 102-111 (lines=10) @@
99
         *
100
         * @throws \Exception
101
         */
102
        protected function checkWhiteList($remoteAddress)
103
        {
104
            if (isset($this->parameters[CmsConstants::PARAMETER_WHITELIST_IPS])) {
105
                $whitelistIps = explode(',', $this->parameters[CmsConstants::PARAMETER_WHITELIST_IPS]);
106
                $whitelistIps = array_map("trim", $whitelistIps);
107
                if (!in_array($remoteAddress, $whitelistIps)) {
108
                    throw new \Exception('Ip address ' . $remoteAddress . ' is not on whitelist');
109
                }
110
            }
111
        }
112
113
        /**
114
         * @param $remoteAddress
@@ 118-127 (lines=10) @@
115
         *
116
         * @throws \Exception
117
         */
118
        protected function checkBlackList($remoteAddress)
119
        {
120
            if (isset($this->parameters[CmsConstants::PARAMETER_BLACKLIST_IPS])) {
121
                $blacklistIps = explode(',', $this->parameters[CmsConstants::PARAMETER_BLACKLIST_IPS]);
122
                $blacklistIps = array_map("trim", $blacklistIps);
123
                if (in_array($remoteAddress, $blacklistIps)) {
124
                    throw new \Exception('Ip address ' . $remoteAddress . ' is on blacklist');
125
                }
126
            }
127
        }
128
129
        /**
130
         * @param $request