Code Duplication    Length = 3-3 lines in 2 locations

modules/walkscore/wp-walkscore-api.php 2 locations

@@ 82-84 (lines=3) @@
79
		 * @return void
80
		 */
81
		function get_walkscore( $latitude, $longitude, $address ) {
82
			if ( empty( $latitude ) || empty( $longitude ) || empty( $address ) ) {
83
				return new WP_Error( 'required-fields', __( 'Required fields are empty.', 'text-domain' ) );
84
			}
85
			$request = $this->base_uri . '/score?format=' . static::$output . '&wsapikey=' . static::$wsapikey . '&lat=' . $latitude . '&lon=' . $longitude . '&address=' . $address;
86
			return $this->fetch( $request );
87
		}
@@ 101-103 (lines=3) @@
98
		 * @return void
99
		 */
100
		function get_transit_score( $latitude, $longitude, $city, $state, $country, $research ) {
101
			if ( empty( $latitude ) || empty( $longitude ) || empty( $city ) || empty( $state ) ) {
102
				return new WP_Error( 'required-fields', __( 'Required fields are empty.', 'text-domain' ) );
103
			}
104
			$request = $this->base_uri . '/transit/score/?wsapikey=' . static::$wsapikey . '&lat=' . $latitude . '&lon=' . $longitude . '&city=' . $city . '&state=' . $state . '&format=' . $output;
105
			return $this->fetch( $request );
106
		}