diff --git a/src/Pusher.php b/src/Pusher.php index 8cdd35b1..d794f35e 100755 --- a/src/Pusher.php +++ b/src/Pusher.php @@ -384,6 +384,7 @@ public static function array_implode($glue, $separator, $array) if (!is_array($array)) { return $array; } + $string = array(); foreach ($array as $key => $val) { if (is_array($val)) { @@ -451,11 +452,13 @@ public function trigger($channels, $event, $data, $socket_id = null, $debug = fa if ($response['status'] === 200 && $debug === false) { return true; - } elseif ($debug === true || $this->settings['debug'] === true) { + } + + if ($debug === true || $this->settings['debug'] === true) { return $response; - } else { - return false; } + + return false; } /** @@ -498,11 +501,13 @@ public function triggerBatch($batch = array(), $debug = false, $already_encoded if ($response['status'] === 200 && $debug === false) { return true; - } elseif ($debug === true || $this->settings['debug'] === true) { + } + + if ($debug === true || $this->settings['debug'] === true) { return $response; - } else { - return false; } + + return false; } /** @@ -661,10 +666,12 @@ public function notify($interests, $data = array(), $debug = false) if ($response['status'] === 202 && $debug === false) { return true; - } elseif ($debug === true || $this->settings['debug'] === true) { + } + + if ($debug === true || $this->settings['debug'] === true) { return $response; - } else { - return false; } + + return false; } }