Skip to content

Commit

Permalink
Compatible with php 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
stenin-nikita committed Apr 8, 2017
1 parent 5533e35 commit 65464d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/Centrifuge.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function initConfiguration(array $config)
* @param string $client
* @return mixed
*/
public function publish(string $channel, array $data, $client = null)
public function publish($channel, array $data, $client = null)
{
$params = ['channel' => $channel, 'data' => $data];

Expand Down Expand Up @@ -119,7 +119,7 @@ public function broadcast(array $channels, array $data, $client = null)
* @param string $channel
* @return mixed
*/
public function presence(string $channel)
public function presence($channel)
{
return $this->send('presence', ['channel' => $channel]);
}
Expand All @@ -130,7 +130,7 @@ public function presence(string $channel)
* @param string $channel
* @return mixed
*/
public function history(string $channel)
public function history($channel)
{
return $this->send('history', ['channel' => $channel]);
}
Expand Down Expand Up @@ -233,7 +233,7 @@ protected function getSecret()
* @param array $params
* @return mixed
*/
protected function send(string $method, array $params = [])
protected function send($method, array $params = [])
{
try {
if ($this->config['redis_api'] === true && ! is_null($this->redisClient) && in_array($method, $this->redisMethods)) {
Expand All @@ -259,7 +259,7 @@ protected function send(string $method, array $params = [])
* @param array $params
* @return mixed
*/
protected function httpSend(string $method, array $params = [])
protected function httpSend($method, array $params = [])
{
$json = json_encode(['method' => $method, 'params' => $params]);

Expand Down Expand Up @@ -307,7 +307,7 @@ protected function prepareUrl()
* @param array $params
* @return mixed
*/
protected function redisSend(string $method, array $params = [])
protected function redisSend($method, array $params = [])
{
$json = json_encode(['method' => $method, 'params' => $params]);

Expand Down
6 changes: 3 additions & 3 deletions src/Contracts/Centrifuge.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface Centrifuge
* @param string $client
* @return mixed
*/
public function publish(string $channel, array $data, $client = null);
public function publish($channel, array $data, $client = null);

/**
* Send message into multiple channel.
Expand All @@ -30,15 +30,15 @@ public function broadcast(array $channels, array $data, $client = null);
* @param string $channel
* @return mixed
*/
public function presence(string $channel);
public function presence($channel);

/**
* Get channel history information (list of last messages sent into channel).
*
* @param string $channel
* @return mixed
*/
public function history(string $channel);
public function history($channel);

/**
* Unsubscribe user from channel.
Expand Down

0 comments on commit 65464d6

Please sign in to comment.