Code Duplication    Length = 3-3 lines in 2 locations

src/u2flib_server/U2F.php 2 locations

@@ 169-171 (lines=3) @@
166
            throw new InvalidArgumentException('$response of doRegister() method only accepts object.');
167
        }
168
169
        if (property_exists($response, 'errorCode') && $response->errorCode !== 0) {
170
            throw new Error(
171
                'User-agent returned error. Error code: ' . $response->errorCode,
172
                ERR_BAD_UA_RETURNING
173
            );
174
        }
@@ 301-303 (lines=3) @@
298
            throw new InvalidArgumentException('$response of doAuthenticate() method only accepts object.');
299
        }
300
301
        if (property_exists($response, 'errorCode') && $response->errorCode !== 0) {
302
            throw new Error(
303
                'User-agent returned error. Error code: ' . $response->errorCode,
304
                ERR_BAD_UA_RETURNING
305
            );
306
        }