Code Duplication    Length = 11-13 lines in 2 locations

class.jetpack.php 1 location

@@ 4709-4719 (lines=11) @@
4706
		return min( $earliest_registration_date, $earliest_post_date );
4707
	}
4708
4709
	public static function apply_activation_source_to_args( &$args ) {
4710
		list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' );
4711
4712
		if ( $activation_source_name ) {
4713
			$args['_as'] = urlencode( $activation_source_name );
4714
		}
4715
4716
		if ( $activation_source_keyword ) {
4717
			$args['_ak'] = urlencode( $activation_source_keyword );
4718
		}
4719
	}
4720
4721
	function build_reconnect_url( $raw = false ) {
4722
		$url = wp_nonce_url( Jetpack::admin_url( 'action=reconnect' ), 'jetpack-reconnect' );

packages/connection/src/Manager.php 1 location

@@ 1063-1075 (lines=13) @@
1060
	 * @param Array $args arguments that need to have the source added.
1061
	 * @return Array $amended arguments.
1062
	 */
1063
	public static function apply_activation_source_to_args( $args ) {
1064
		list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' );
1065
1066
		if ( $activation_source_name ) {
1067
			$args['_as'] = urlencode( $activation_source_name );
1068
		}
1069
1070
		if ( $activation_source_keyword ) {
1071
			$args['_ak'] = urlencode( $activation_source_keyword );
1072
		}
1073
1074
		return $args;
1075
	}
1076
1077
	/**
1078
	 * Returns the callable that would be used to generate secrets.