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

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