Code Duplication    Length = 11-13 lines in 2 locations

packages/connection/src/Manager.php 1 location

@@ 1011-1023 (lines=13) @@
1008
	 * @param Array $args arguments that need to have the source added.
1009
	 * @return Array $amended arguments.
1010
	 */
1011
	public static function apply_activation_source_to_args( $args ) {
1012
		list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' );
1013
1014
		if ( $activation_source_name ) {
1015
			$args['_as'] = urlencode( $activation_source_name );
1016
		}
1017
1018
		if ( $activation_source_keyword ) {
1019
			$args['_ak'] = urlencode( $activation_source_keyword );
1020
		}
1021
1022
		return $args;
1023
	}
1024
1025
	/**
1026
	 * Returns the callable that would be used to generate secrets.

class.jetpack.php 1 location

@@ 4622-4632 (lines=11) @@
4619
		return min( $earliest_registration_date, $earliest_post_date );
4620
	}
4621
4622
	public static function apply_activation_source_to_args( &$args ) {
4623
		list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' );
4624
4625
		if ( $activation_source_name ) {
4626
			$args['_as'] = urlencode( $activation_source_name );
4627
		}
4628
4629
		if ( $activation_source_keyword ) {
4630
			$args['_ak'] = urlencode( $activation_source_keyword );
4631
		}
4632
	}
4633
4634
	function build_reconnect_url( $raw = false ) {
4635
		$url = wp_nonce_url( Jetpack::admin_url( 'action=reconnect' ), 'jetpack-reconnect' );