Code Duplication    Length = 6-13 lines in 3 locations

src/wp-includes/class-wp-xmlrpc-server.php 3 locations

@@ 2498-2510 (lines=13) @@
2495
		$password = $args[2];
2496
		$user_id  = (int) $args[3];
2497
2498
		if ( isset( $args[4] ) ) {
2499
			$fields = $args[4];
2500
		} else {
2501
			/**
2502
			 * Filters the default user query fields used by the given XML-RPC method.
2503
			 *
2504
			 * @since 3.5.0
2505
			 *
2506
			 * @param array  $fields User query fields for given method. Default 'all'.
2507
			 * @param string $method The method name.
2508
			 */
2509
			$fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUser' );
2510
		}
2511
2512
		if ( ! $user = $this->login( $username, $password ) )
2513
			return $this->error;
@@ 2563-2568 (lines=6) @@
2560
		$password = $args[2];
2561
		$filter   = isset( $args[3] ) ? $args[3] : array();
2562
2563
		if ( isset( $args[4] ) ) {
2564
			$fields = $args[4];
2565
		} else {
2566
			/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2567
			$fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUsers' );
2568
		}
2569
2570
		if ( ! $user = $this->login( $username, $password ) )
2571
			return $this->error;
@@ 2636-2641 (lines=6) @@
2633
		$username = $args[1];
2634
		$password = $args[2];
2635
2636
		if ( isset( $args[3] ) ) {
2637
			$fields = $args[3];
2638
		} else {
2639
			/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2640
			$fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getProfile' );
2641
		}
2642
2643
		if ( ! $user = $this->login( $username, $password ) )
2644
			return $this->error;