Code Duplication    Length = 8-8 lines in 2 locations

source/Login.php 1 location

@@ 155-162 (lines=8) @@
152
            "passLogin" => " *Enter the password"
153
        );
154
155
        foreach ($data as $key => $value) {
156
            $data[$key] = trim($data[$key]);
157
            $value = trim($value);
158
            if (empty($value)) {
159
                $this->onError($key, $errorCode[$key]);
160
            }
161
        }
162
        return $data;
163
    }
164
}
165

source/Register.php 1 location

@@ 169-176 (lines=8) @@
166
            "mob" => " *Enter the Mobile Number"
167
        );
168
169
        foreach ($data as $key => $value) {
170
            $data[$key] = trim($data[$key]);
171
            $value = trim($value);
172
            if (empty($value)) {
173
                $this->onError($key, $errorCode[$key]);
174
            }
175
        }
176
        return $data;
177
    }
178
}
179