Code Duplication    Length = 13-13 lines in 2 locations

source/Login.php 1 location

@@ 127-139 (lines=13) @@
124
     *
125
     * @return void
126
     */
127
    public function onError($key, $value)
128
    {
129
        $this->flag = 1;
130
        $this->error = array_merge(
131
            $this->error,
132
            [
133
            [
134
            "key" => $key,
135
            "value" => $value
136
            ]
137
            ]
138
        );
139
    }
140
141
    /**
142
     * For checking whether the credentials are empty or not

source/Register.php 1 location

@@ 138-150 (lines=13) @@
135
     *
136
     * @return void
137
     */
138
    public function onError($key, $value)
139
    {
140
        $this->flag = 1;
141
        $this->error = array_merge(
142
            $this->error,
143
            [
144
            [
145
            "key" => $key,
146
            "value" => $value
147
            ]
148
            ]
149
        );
150
    }
151
152
    /**
153
     * For checking whether the credentials are empty or not