Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 148-157 (lines=10) @@
145
		 * @param bool   $rentzestimate (default: false) Rent Zestimate.
146
		 * @return Request.
147
		 */
148
		function get_deep_comps( $zpid, $count = '5', $rentzestimate = false ) {
149
			if ( empty( $zpid ) ) {
150
				return new WP_Error( 'required-fields', __( 'Required fields are empty.', 're-pro' ) );
151
			}
152
			$request = $this->base_uri . '/GetDeepComps.htm?zws-id=' . static::$zws_id . '&zpid=' . $zpid . '&count=' . $count;
153
			$xml = simplexml_load_file( $request );
154
			$json = wp_json_encode( $xml );
155
			$deep_comps = json_decode( $json, true );
156
			return $deep_comps;
157
		}
158
		/**
159
		 * Get Updated Property Details.
160
		 *
@@ 224-233 (lines=10) @@
221
		 * @param string $chart_duration (default: '1year') Chart Duration.
222
		 * @return Request.
223
		 */
224
		function get_chart( $zpid, $unit_type, $width = '600', $height = '300', $chart_duration = '1year' ) {
225
			if ( empty( $zpid ) && empty( $unit_type ) ) {
226
				return new WP_Error( 'required-fields', __( 'Required fields are empty.', 're-pro' ) );
227
			}
228
			$request = $this->base_uri . '/GetChart.htm?zws-id=' . static::$zws_id . '&unit-type=' . $unit_type . '&zpid=' . $zpid;
229
			$xml = simplexml_load_file( $request );
230
			$json = wp_json_encode( $xml );
231
			$chart = json_decode( $json, true );
232
			return $chart;
233
		}
234
		/**
235
		 * Get Comps.
236
		 *