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

@@ 387-397 (lines=11) @@
384
		$auto_enable_sso = ( ! $this->connection->is_active() || Jetpack::is_module_active( 'sso' ) );
385
386
		/** This filter is documented in class.jetpack-cli.php */
387
		if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
388
			$redirect_uri = add_query_arg(
389
				array(
390
					'action'      => 'jetpack-sso',
391
					'redirect_to' => rawurlencode( admin_url() ),
392
				),
393
				wp_login_url() // TODO: come back to Jetpack dashboard?
394
			);
395
		} else {
396
			$redirect_uri = admin_url();
397
		}
398
399
		// Generate secrets.
400
		$roles   = new Roles();