Code Duplication    Length = 10-10 lines in 2 locations

src/components/CmsComponent.php 2 locations

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