Code Duplication    Length = 11-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/packages/connection/legacy/class-jetpack-xmlrpc-server.php 1 location

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