Code Duplication    Length = 8-8 lines in 2 locations

src/Login.php 1 location

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

src/Register.php 1 location

@@ 185-192 (lines=8) @@
182
            "mob" => " *Enter the Mobile Number"
183
        );
184
185
        foreach ($data as $key => $value) {
186
            $data[$key] = trim($data[$key]);
187
            $value = trim($value);
188
            if (empty($value)) {
189
                $this->onError($key, $errorCode[$key]);
190
            }
191
        }
192
        return $data;
193
    }
194
}
195