Code Duplication    Length = 9-11 lines in 2 locations

projects/plugins/jetpack/_inc/class.jetpack-provision.php 1 location

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

projects/plugins/jetpack/class-jetpack-xmlrpc-methods.php 1 location

@@ 258-266 (lines=9) @@
255
		$auto_enable_sso = ( ! ( new Connection_Manager() )->has_connected_owner() || Jetpack::is_module_active( 'sso' ) );
256
257
		/** This filter is documented in class.jetpack-cli.php */
258
		if ( apply_filters( 'jetpack_start_enable_sso', $auto_enable_sso ) ) {
259
			$redirect_uri = add_query_arg(
260
				array(
261
					'action'      => 'jetpack-sso',
262
					'redirect_to' => rawurlencode( admin_url() ),
263
				),
264
				wp_login_url() // TODO: come back to Jetpack dashboard?
265
			);
266
		}
267
268
		return $redirect_uri;
269
	}