Code Duplication    Length = 6-6 lines in 3 locations

handlers/Validator.php 3 locations

@@ 82-87 (lines=6) @@
79
    {
80
        $value = $this->getSubmitted('module.id');
81
82
        if (empty($value)) {
83
            $vars = array('@field' => $this->language->text('ID'));
84
            $error = $this->language->text('@field is required', $vars);
85
            $this->setError('module.id', $error);
86
            return false;
87
        }
88
89
        if (!$this->config->validModuleId($value)) {
90
            $vars = array('@field' => $this->language->text('ID'));
@@ 123-128 (lines=6) @@
120
    {
121
        $value = $this->getSubmitted('module.core');
122
123
        if (empty($value)) {
124
            $vars = array('@field' => $this->language->text('Core'));
125
            $error = $this->language->text('@field is required', $vars);
126
            $this->setError('module.core', $error);
127
            return false;
128
        }
129
130
        // Check if the value starts with a number
131
        if (preg_match('/^\d/', $value) !== 1) {
@@ 131-136 (lines=6) @@
128
        }
129
130
        // Check if the value starts with a number
131
        if (preg_match('/^\d/', $value) !== 1) {
132
            $vars = array('@field' => $this->language->text('Core'));
133
            $error = $this->language->text('@field has invalid value', $vars);
134
            $this->setError('module.core', $error);
135
            return false;
136
        }
137
138
        return true;
139
    }