Code Duplication    Length = 11-11 lines in 2 locations

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

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

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

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