Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit fd740a7

Browse files
author
Santiago Garza
committed
updates to get_implode
1 parent 9df9a94 commit fd740a7

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

wp-uptime-robot-api.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function new_monitor( $friendly_name, $url, $type, $alert_contacts = null
135135
$request = $this->base_uri . '/newMonitor?monitorFriendlyName=' . $friendly_name . '&monitorURL=' . $url . '&monitorType=' . $type;
136136

137137
if ( ! empty( $alert_contacts ) ) {
138-
$request .= '&monitorAlertContacts=' . $this->getImplode( $alert_contacts );
138+
$request .= '&monitorAlertContacts=' . $this->get_implode( $alert_contacts );
139139
}
140140
if ( ! empty( $sub_type ) ) {
141141
$request .= '&monitorSubType=' . $sub_type;
@@ -326,15 +326,17 @@ public function response_code_msg( $code = '' ) {
326326
}
327327

328328
/**
329-
* Array or int to string with separator (-)
329+
* Implode the array and deliminate the values with '-' or return the variable
330+
* as is.
330331
*
331-
* @param array|int $var
332-
* @return type string
332+
* @param [Array|String] $var Array to be imploded or a string to be sent back.
333+
* @return [String] Imploded string.
333334
*/
334-
private function getImplode( $var ) {
335+
private function get_implode( $var ) {
335336
if ( is_array( $var ) ) {
336337
return implode( '-', $var );
337338
}
338-
return $var;
339+
340+
return $var;
339341
}
340342
}

0 commit comments

Comments
 (0)