Code Duplication    Length = 11-13 lines in 2 locations

class.jetpack.php 1 location

@@ 4584-4594 (lines=11) @@
4581
		return min( $earliest_registration_date, $earliest_post_date );
4582
	}
4583
4584
	public static function apply_activation_source_to_args( &$args ) {
4585
		list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' );
4586
4587
		if ( $activation_source_name ) {
4588
			$args['_as'] = urlencode( $activation_source_name );
4589
		}
4590
4591
		if ( $activation_source_keyword ) {
4592
			$args['_ak'] = urlencode( $activation_source_keyword );
4593
		}
4594
	}
4595
4596
	function build_reconnect_url( $raw = false ) {
4597
		$url = wp_nonce_url( Jetpack::admin_url( 'action=reconnect' ), 'jetpack-reconnect' );

packages/connection/src/Manager.php 1 location

@@ 1024-1036 (lines=13) @@
1021
	 * @param Array $args arguments that need to have the source added.
1022
	 * @return Array $amended arguments.
1023
	 */
1024
	public static function apply_activation_source_to_args( $args ) {
1025
		list( $activation_source_name, $activation_source_keyword ) = get_option( 'jetpack_activation_source' );
1026
1027
		if ( $activation_source_name ) {
1028
			$args['_as'] = urlencode( $activation_source_name );
1029
		}
1030
1031
		if ( $activation_source_keyword ) {
1032
			$args['_ak'] = urlencode( $activation_source_keyword );
1033
		}
1034
1035
		return $args;
1036
	}
1037
1038
	/**
1039
	 * Returns the callable that would be used to generate secrets.