Code Duplication    Length = 3-3 lines in 2 locations

projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php 1 location

@@ 1797-1799 (lines=3) @@
1794
	public static function register_site( $request ) {
1795
		_deprecated_function( __METHOD__, 'jetpack-9.7.0', '\Automattic\Jetpack\Connection\REST_Connector::connection_register' );
1796
1797
		if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) {
1798
			return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack' ), array( 'status' => 403 ) );
1799
		}
1800
1801
		if ( isset( $request['from'] ) ) {
1802
			Jetpack::connection()->add_register_request_param( 'from', (string) $request['from'] );

projects/packages/connection/src/class-rest-connector.php 1 location

@@ 446-448 (lines=3) @@
443
	 * @return \WP_REST_Response|WP_Error
444
	 */
445
	public function connection_register( $request ) {
446
		if ( ! wp_verify_nonce( $request->get_param( 'registration_nonce' ), 'jetpack-registration-nonce' ) ) {
447
			return new WP_Error( 'invalid_nonce', __( 'Unable to verify your request.', 'jetpack' ), array( 'status' => 403 ) );
448
		}
449
450
		if ( isset( $request['from'] ) ) {
451
			$this->connection->add_register_request_param( 'from', (string) $request['from'] );