Skip to content

Commit

Permalink
format codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
hhxsv5 committed Mar 4, 2021
1 parent 9275f17 commit 4244e4e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ $callback = function () {
// return ['event' => 'ping', 'data' => 'ping data']; // Custom event temporarily: send ping event
// return ['id' => uniqid(), 'data' => json_encode(compact('news'))]; // Custom event Id
};
(new SSE(new Event($callback, 'news')))->start(3);
(new SSE(new Event($callback, 'news')))->start();
```

### Symfony and Laravel demo
Expand Down Expand Up @@ -107,7 +107,7 @@ public function getNewsStream()
// return ['event' => 'ping', 'data' => 'ping data']; // Custom event temporarily: send ping event
// return ['id' => uniqid(), 'data' => json_encode(compact('news'))]; // Custom event Id
};
(new SSE(new Event($callback, 'news')))->start(3);
(new SSE(new Event($callback, 'news')))->start();
});
return $response;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/sse-swoole.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
// return ['event' => 'ping', 'data' => 'ping data']; // Custom event temporarily: send ping event
// return ['id' => uniqid(), 'data' => json_encode(compact('news'))]; // Custom event Id
}, 'news');
(new SSESwoole($event, $request, $response))->start(3);
(new SSESwoole($event, $request, $response))->start();
});
$server->start();
2 changes: 1 addition & 1 deletion examples/sse.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
// return ['event' => 'ping', 'data' => 'ping data']; // Custom event temporarily: send ping event
// return ['id' => uniqid(), 'data' => json_encode(compact('news'))]; // Custom event Id
};
(new SSE(new Event($callback, 'news')))->start(3);
(new SSE(new Event($callback, 'news')))->start();

0 comments on commit 4244e4e

Please sign in to comment.