Code Duplication    Length = 11-11 lines in 2 locations

class.jetpack-xmlrpc-server.php 1 location

@@ 324-334 (lines=11) @@
321
		$auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) );
322
323
		/** This filter is documented in class.jetpack-cli.php */
324
		if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
325
			$redirect_uri = add_query_arg(
326
				array(
327
					'action'      => 'jetpack-sso',
328
					'redirect_to' => rawurlencode( admin_url() ),
329
				),
330
				wp_login_url() // TODO: come back to Jetpack dashboard?
331
			);
332
		} else {
333
			$redirect_uri = admin_url();
334
		}
335
336
		// Generate secrets.
337
		$roles   = new Roles();

_inc/class.jetpack-provision.php 1 location

@@ 82-92 (lines=11) @@
79
		$auto_enable_sso = ( ! Jetpack::is_active() || Jetpack::is_module_active( 'sso' ) );
80
81
		/** This filter is documented in class.jetpack-cli.php */
82
		if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
83
			$redirect_uri = add_query_arg(
84
				array(
85
					'action'      => 'jetpack-sso',
86
					'redirect_to' => rawurlencode( admin_url() ),
87
				),
88
				wp_login_url() // TODO: come back to Jetpack dashboard?
89
			);
90
		} else {
91
			$redirect_uri = admin_url();
92
		}
93
94
		$request_body = array(
95
			'jp_version'   => JETPACK__VERSION,