Code Duplication    Length = 11-11 lines in 2 locations

_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,

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

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