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

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