Code Duplication    Length = 8-8 lines in 2 locations

src/Login.php 1 location

@@ 129-136 (lines=8) @@
126
     *
127
     * @return void
128
     */
129
    public function onError($key, $value)
130
    {
131
        $this->flag = 1;
132
        $this->error = array_merge(
133
            $this->error,
134
            [["key" => $key, "value" => $value]]
135
        );
136
    }
137
138
    /**
139
     * For Traversing data to check for error

src/Register.php 1 location

@@ 159-166 (lines=8) @@
156
     *
157
     * @return void
158
     */
159
    public function onError($key, $value)
160
    {
161
        $this->flag = 1;
162
        $this->error = array_merge(
163
            $this->error,
164
            [["key" => $key, "value" => $value]]
165
        );
166
    }
167
168
    /**
169
     * For Traversing data to check for error