@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | * |
| 23 | 23 | * @access public |
| 24 | 24 | * @param mixed $address |
| 25 | - * @return void |
|
| 25 | + * @return string |
|
| 26 | 26 | */ |
| 27 | 27 | public function extract_zipcode( $address ) { |
| 28 | 28 | $zipcode = preg_match("/\b[A-Z]{2}\s+\d{5}(-\d{4})?\b/", $address, $matches); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @access public |
| 62 | 62 | * @param mixed $zip_code |
| 63 | - * @return void |
|
| 63 | + * @return boolean |
|
| 64 | 64 | */ |
| 65 | 65 | public function validate_usa_zipcode( $zip_code ) { |
| 66 | 66 | if ( preg_match("/^([0-9]{5})(-[0-9]{4})?$/i", $zip_code) ) |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | * |
| 76 | 76 | * @access public |
| 77 | 77 | * @param mixed $latitude |
| 78 | - * @return void |
|
| 78 | + * @return boolean |
|
| 79 | 79 | */ |
| 80 | 80 | public function is_valid_latitude($latitude) { |
| 81 | 81 | if ( preg_match("/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}$/", $latitude) ) { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * |
| 92 | 92 | * @access public |
| 93 | 93 | * @param mixed $longitude |
| 94 | - * @return void |
|
| 94 | + * @return boolean |
|
| 95 | 95 | */ |
| 96 | 96 | public function is_valid_longitude($longitude) { |
| 97 | 97 | if (preg_match("/^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\.{1}\d{1,6}$/", |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | * Fetch the request from the API. |
| 41 | 41 | * |
| 42 | 42 | * @access private |
| 43 | - * @param mixed $request Request URL. |
|
| 43 | + * @param string $request Request URL. |
|
| 44 | 44 | * @return $body Body. |
| 45 | 45 | */ |
| 46 | 46 | private function fetch( $request ) { |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @access public |
| 27 | 27 | * @param string $iframe_id (default: '') |
| 28 | - * @return void |
|
| 28 | + * @return string|null |
|
| 29 | 29 | */ |
| 30 | 30 | public function nar_iframe_id( $iframe_id = '' ) { |
| 31 | 31 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * |
| 41 | 41 | * @access public |
| 42 | 42 | * @param string $widget_name (default: '') |
| 43 | - * @return void |
|
| 43 | + * @return string |
|
| 44 | 44 | */ |
| 45 | 45 | public function nar_iframe_class( $widget_name = '' ) { |
| 46 | 46 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * __construct function. |
| 40 | 40 | * |
| 41 | 41 | * @access public |
| 42 | - * @param mixed $api_key API Key. |
|
| 42 | + * @param string $api_key API Key. |
|
| 43 | 43 | * @return void |
| 44 | 44 | */ |
| 45 | 45 | public function __construct( $api_key ) { |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * Fetch the request from the API. |
| 54 | 54 | * |
| 55 | 55 | * @access private |
| 56 | - * @param mixed $request Request URL. |
|
| 56 | + * @param string $request Request URL. |
|
| 57 | 57 | * @return $body Body. |
| 58 | 58 | */ |
| 59 | 59 | private function fetch( $request ) { |
@@ -5,8 +5,8 @@ |
||
| 5 | 5 | * |
| 6 | 6 | * @access public |
| 7 | 7 | * @param string $type (default: 'for_sale') |
| 8 | - * @param mixed $city |
|
| 9 | - * @param mixed $state |
|
| 8 | + * @param string $city |
|
| 9 | + * @param string $state |
|
| 10 | 10 | * @param string $min_price (default: '') |
| 11 | 11 | * @param string $max_price (default: '') |
| 12 | 12 | * @param string $property_type (default: '') |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * |
| 47 | 47 | * @access public |
| 48 | 48 | * @param string $iframe_id (default: '') |
| 49 | - * @return void |
|
| 49 | + * @return string|null |
|
| 50 | 50 | */ |
| 51 | 51 | public function trulia_iframe_id( $iframe_id = '' ) { |
| 52 | 52 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * |
| 62 | 62 | * @access public |
| 63 | 63 | * @param string $widget_name (default: '') |
| 64 | - * @return void |
|
| 64 | + * @return string |
|
| 65 | 65 | */ |
| 66 | 66 | public function trulia_iframe_class( $widget_name = '' ) { |
| 67 | 67 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * Fetch the request from the API. |
| 56 | 56 | * |
| 57 | 57 | * @access private |
| 58 | - * @param mixed $request Request URL. |
|
| 58 | + * @param string $request Request URL. |
|
| 59 | 59 | * @return $body Body. |
| 60 | 60 | */ |
| 61 | 61 | private function fetch( $request ) { |
@@ -71,11 +71,9 @@ discard block |
||
| 71 | 71 | * Get Walkscore (https://www.walkscore.com/professional/api.php) |
| 72 | 72 | * |
| 73 | 73 | * @access public |
| 74 | - * @param mixed $wsapikey Your Walk Score API Key. Contact us to get one. Required. |
|
| 75 | 74 | * @param mixed $latitude The latitude of the requested location. Required. |
| 76 | 75 | * @param mixed $longitude The longitude of the requested location. Required. |
| 77 | 76 | * @param mixed $address The URL encoded address. Required. |
| 78 | - * @param mixed $format Return results in XML or JSON (defaults to XML). |
|
| 79 | 77 | * @return void |
| 80 | 78 | */ |
| 81 | 79 | function get_walkscore( $latitude, $longitude, $address ) { |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * |
| 47 | 47 | * @access public |
| 48 | 48 | * @param string $iframe_id (default: '') |
| 49 | - * @return void |
|
| 49 | + * @return string|null |
|
| 50 | 50 | */ |
| 51 | 51 | public function zillow_iframe_id( $iframe_id = '' ) { |
| 52 | 52 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * |
| 62 | 62 | * @access public |
| 63 | 63 | * @param string $widget_name (default: '') |
| 64 | - * @return void |
|
| 64 | + * @return string |
|
| 65 | 65 | */ |
| 66 | 66 | public function zillow_iframe_class( $widget_name = '' ) { |
| 67 | 67 | |
@@ -413,7 +413,6 @@ discard block |
||
| 413 | 413 | * get_lg_zillow_search_widget function. |
| 414 | 414 | * |
| 415 | 415 | * @access public |
| 416 | - * @param string $widget_type (default: 'iframe') |
|
| 417 | 416 | * @param string $iframe_id (default: '') |
| 418 | 417 | * @param mixed $zillow_screenname |
| 419 | 418 | * @param string $type (default: 'iframe') |
@@ -287,48 +287,48 @@ |
||
| 287 | 287 | */ |
| 288 | 288 | public function response_code_msg( $code = '' ) { |
| 289 | 289 | switch ( $code ) { |
| 290 | - case 0: |
|
| 291 | - $msg = __( 'Request successfully processed.', 're-pro' ); |
|
| 292 | - break; |
|
| 293 | - case 1: |
|
| 294 | - $msg = __( 'Service error-there was a server-side error while processing the request.', 're-pro' ); |
|
| 295 | - break; |
|
| 296 | - case 2: |
|
| 297 | - $msg = __( 'The specified ZWSID parameter was invalid or not specified in the request.', 're-pro' ); |
|
| 298 | - break; |
|
| 299 | - case 3: |
|
| 300 | - $msg = __( 'Web services are currently unavailable.', 're-pro' ); |
|
| 301 | - break; |
|
| 302 | - case 4: |
|
| 303 | - $msg = __( 'The API call is currently unavailable.', 're-pro' ); |
|
| 304 | - break; |
|
| 305 | - case 500: |
|
| 306 | - $msg = __( 'Invalid or missing address parameter.', 're-pro' ); |
|
| 307 | - break; |
|
| 308 | - case 501: |
|
| 309 | - $msg = __( 'Invalid or missing city, state, zip parameter.', 're-pro' ); |
|
| 310 | - break; |
|
| 311 | - case 502: |
|
| 312 | - $msg = __( 'No results found.', 're-pro' ); |
|
| 313 | - break; |
|
| 314 | - case 503: |
|
| 315 | - $msg = __( 'Failed to resolve city, state or ZIP code.', 're-pro' ); |
|
| 316 | - break; |
|
| 317 | - case 504: |
|
| 318 | - $msg = __( 'No coverage for specified area.', 're-pro' ); |
|
| 319 | - break; |
|
| 320 | - case 505: |
|
| 321 | - $msg = __( 'Timeout.', 're-pro' ); |
|
| 322 | - break; |
|
| 323 | - case 506: |
|
| 324 | - $msg = __( 'Address string too long.', 're-pro' ); |
|
| 325 | - break; |
|
| 326 | - case 507: |
|
| 327 | - $msg = __( 'No exact match found.', 're-pro' ); |
|
| 328 | - break; |
|
| 329 | - default: |
|
| 330 | - $msg = __( 'Sorry, response code is unknown.' ); |
|
| 331 | - break; |
|
| 290 | + case 0: |
|
| 291 | + $msg = __( 'Request successfully processed.', 're-pro' ); |
|
| 292 | + break; |
|
| 293 | + case 1: |
|
| 294 | + $msg = __( 'Service error-there was a server-side error while processing the request.', 're-pro' ); |
|
| 295 | + break; |
|
| 296 | + case 2: |
|
| 297 | + $msg = __( 'The specified ZWSID parameter was invalid or not specified in the request.', 're-pro' ); |
|
| 298 | + break; |
|
| 299 | + case 3: |
|
| 300 | + $msg = __( 'Web services are currently unavailable.', 're-pro' ); |
|
| 301 | + break; |
|
| 302 | + case 4: |
|
| 303 | + $msg = __( 'The API call is currently unavailable.', 're-pro' ); |
|
| 304 | + break; |
|
| 305 | + case 500: |
|
| 306 | + $msg = __( 'Invalid or missing address parameter.', 're-pro' ); |
|
| 307 | + break; |
|
| 308 | + case 501: |
|
| 309 | + $msg = __( 'Invalid or missing city, state, zip parameter.', 're-pro' ); |
|
| 310 | + break; |
|
| 311 | + case 502: |
|
| 312 | + $msg = __( 'No results found.', 're-pro' ); |
|
| 313 | + break; |
|
| 314 | + case 503: |
|
| 315 | + $msg = __( 'Failed to resolve city, state or ZIP code.', 're-pro' ); |
|
| 316 | + break; |
|
| 317 | + case 504: |
|
| 318 | + $msg = __( 'No coverage for specified area.', 're-pro' ); |
|
| 319 | + break; |
|
| 320 | + case 505: |
|
| 321 | + $msg = __( 'Timeout.', 're-pro' ); |
|
| 322 | + break; |
|
| 323 | + case 506: |
|
| 324 | + $msg = __( 'Address string too long.', 're-pro' ); |
|
| 325 | + break; |
|
| 326 | + case 507: |
|
| 327 | + $msg = __( 'No exact match found.', 're-pro' ); |
|
| 328 | + break; |
|
| 329 | + default: |
|
| 330 | + $msg = __( 'Sorry, response code is unknown.' ); |
|
| 331 | + break; |
|
| 332 | 332 | } |
| 333 | 333 | return $msg; |
| 334 | 334 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | * Fetch the request from the API. |
| 41 | 41 | * |
| 42 | 42 | * @access private |
| 43 | - * @param mixed $request Request URL. |
|
| 43 | + * @param string $request Request URL. |
|
| 44 | 44 | * @return $body Body. |
| 45 | 45 | */ |
| 46 | 46 | private function fetch( $request ) { |