Code Duplication    Length = 3-3 lines in 2 locations

src/u2flib_server/U2F.php 2 locations

@@ 161-163 (lines=3) @@
158
            throw new \InvalidArgumentException('$response of doRegister() method only accepts object.');
159
        }
160
161
        if( property_exists( $response, 'errorCode') && $response->errorCode !== 0 ) {
162
            throw new Error('User-agent returned error. Error code: ' . $response->errorCode, ERR_BAD_UA_RETURNING );
163
        }
164
165
        if( !is_bool( $includeCert ) ) {
166
            throw new \InvalidArgumentException('$include_cert of doRegister() method only accepts boolean.');
@@ 283-285 (lines=3) @@
280
            throw new \InvalidArgumentException('$response of doAuthenticate() method only accepts object.');
281
        }
282
283
        if( property_exists( $response, 'errorCode') && $response->errorCode !== 0 ) {
284
            throw new Error('User-agent returned error. Error code: ' . $response->errorCode, ERR_BAD_UA_RETURNING );
285
        }
286
287
        /** @var object|null $req */
288
        $req = null;