Code Duplication    Length = 7-8 lines in 2 locations

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

@@ 260-267 (lines=8) @@
257
		 * @param mixed $url URL.
258
		 * @return Request.
259
		 */
260
		function get_zpid_from_url( $url ) {
261
			if ( empty( $url ) ) {
262
				return new WP_Error( 'required-fields', __( 'Please provide a URL.', 're-pro' ) );
263
			}
264
			preg_match( '!\d+_zpid!', $url, $matches );
265
			$final_match = preg_replace( '/_zpid/', '', $matches );
266
			return $final_match['0'];
267
		}
268
		/**
269
		 * Get Agent/Team Screenname from URL.
270
		 *
@@ 275-281 (lines=7) @@
272
		 * @param mixed $url URL.
273
		 * @return void
274
		 */
275
		function get_agent_screenname_from_url( $url ) {
276
			if ( empty( $url ) ) {
277
				return new WP_Error( 'required-fields', __( 'Please provide a URL.', 're-pro' ) );
278
			}
279
			$final_match = preg_replace( '/\/(\d+)$/', '', explode('/', $url) );
280
			return $final_match[4];
281
		}
282
		/**
283
		 * Response code message for GetSearchResults.
284
		 *