Code Duplication    Length = 11-11 lines in 2 locations

packages/connection/legacy/class.jetpack-xmlrpc-server.php 1 location

@@ 369-379 (lines=11) @@
366
		$auto_enable_sso = ( ! $this->connection->is_active() || Jetpack::is_module_active( 'sso' ) );
367
368
		/** This filter is documented in class.jetpack-cli.php */
369
		if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
370
			$redirect_uri = add_query_arg(
371
				array(
372
					'action'      => 'jetpack-sso',
373
					'redirect_to' => rawurlencode( admin_url() ),
374
				),
375
				wp_login_url() // TODO: come back to Jetpack dashboard?
376
			);
377
		} else {
378
			$redirect_uri = admin_url();
379
		}
380
381
		// Generate secrets.
382
		$roles   = new Roles();

_inc/class.jetpack-provision.php 1 location

@@ 72-82 (lines=11) @@
69
		$auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) );
70
71
		/** This filter is documented in class.jetpack-cli.php */
72
		if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
73
			$redirect_uri = add_query_arg(
74
				array(
75
					'action'      => 'jetpack-sso',
76
					'redirect_to' => rawurlencode( admin_url() ),
77
				),
78
				wp_login_url() // TODO: come back to Jetpack dashboard?
79
			);
80
		} else {
81
			$redirect_uri = admin_url();
82
		}
83
84
		$request_body = array(
85
			'jp_version'   => JETPACK__VERSION,