Skip to content

Commit

Permalink
Update Socket.php
Browse files Browse the repository at this point in the history
support to php 7
  • Loading branch information
andriykhc committed Sep 12, 2022
1 parent 4e2d1ac commit ccbe9cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __construct(string $baseURL, Auth $auth)
* @param array|null $data
* @return array
*/
protected function makeJsonRequest(string|array $channels, string $event, array|string|null $data): array
protected function makeJsonRequest($channels, string $event, $data): array
{
if (is_string($channels)) {
$channels = [$channels];
Expand Down Expand Up @@ -99,7 +99,7 @@ protected function log(string $message, array $context = [], string $level = Log
* @param array $config
* @return \Psr\Http\Message\ResponseInterface
*/
public function trigger(string|array $channels, string $event, array|string|null $data = null, array $config = []): ResponseInterface
public function trigger($channels, string $event, $data = null, array $config = []): ResponseInterface
{
$this->log('Botika Socket Trigger', $this->makeJsonRequest($channels, $event, $data));

Expand All @@ -119,7 +119,7 @@ public function trigger(string|array $channels, string $event, array|string|null
* @param array $config
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function triggerAsync(string|array $channels, string $event, array|string|null $data = null, array $config = []): PromiseInterface
public function triggerAsync($channels, string $event, $data = null, array $config = []): PromiseInterface
{
$this->log('Botika Socket Trigger Asynchronously', $this->makeJsonRequest($channels, $event, $data));

Expand Down

0 comments on commit ccbe9cc

Please sign in to comment.