Code Duplication    Length = 3-3 lines in 2 locations

class.jetpack-cli.php 2 locations

@@ 1063-1065 (lines=3) @@
1060
	public function partner_cancel( $args, $named_args ) {
1061
		list( $token_json ) = $args;
1062
1063
		if ( ! $token_json || ! ( $token = json_decode( $token_json ) ) ) {
1064
			$this->partner_provision_error( new WP_Error( 'missing_access_token',  sprintf( __( 'Invalid token JSON: %s', 'jetpack' ), $token_json ) ) );
1065
		}
1066
1067
		if ( isset( $token->error ) ) {
1068
			$this->partner_provision_error( new WP_Error( $token->error, $token->message ) );
@@ 1151-1153 (lines=3) @@
1148
	public function partner_provision( $args, $named_args ) {
1149
		list( $token_json ) = $args;
1150
1151
		if ( ! $token_json || ! ( $token = json_decode( $token_json ) ) ) {
1152
			$this->partner_provision_error( new WP_Error( 'missing_access_token',  sprintf( __( 'Invalid token JSON: %s', 'jetpack' ), $token_json ) ) );
1153
		}
1154
1155
		if ( isset( $token->error ) ) {
1156
			$message = isset( $token->message )