Code Duplication    Length = 16-16 lines in 2 locations

admin/controller/captcha/google.php 1 location

@@ 88-103 (lines=16) @@
85
        return $form->render(true);
86
    }
87
88
    protected function validate()
89
    {
90
        if (!$this->user->hasPermission('modify', 'captcha/google')) {
91
            $this->error['warning'] = $this->language->get('error_permission');
92
        }
93
94
        if (empty($this->request->post['google_captcha_public'])) {
95
            $this->error['warning'] = $this->language->get('error_public');
96
        }
97
98
        if (empty($this->request->post['google_captcha_secret'])) {
99
            $this->error['warning'] = $this->language->get('error_secret');
100
        }
101
102
        return !$this->error;
103
    }
104
}
105

admin/controller/antifraud/maxmind.php 1 location

@@ 332-347 (lines=16) @@
329
        return $form->render(true);
330
    }
331
332
    protected function validate()
333
    {
334
        if (!$this->user->hasPermission('modify', 'antifraud/maxmind')) {
335
            $this->error['warning'] = $this->language->get('error_permission');
336
        }
337
338
        if (empty($this->request->post['maxmind_antifraud_key'])) {
339
            $this->error['warning'] = $this->language->get('error_key');
340
        }
341
342
        if (empty($this->request->post['maxmind_antifraud_score'])) {
343
            $this->error['warning'] = $this->language->get('error_score');
344
        }
345
346
        return !$this->error;
347
    }
348
}
349