Skip to content
This repository was archived by the owner on Aug 25, 2022. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Engine/SocketIO/Version1X.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public function connect()
return;
}

$this->handshake();
if($this->options['transport'] != 'websocket'){

@peter279k peter279k Feb 10, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make coding style consistency? And this code snippet should be:

......
if ($this->options['transport'] != 'websocket') {
......

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be if (...) {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

give space between ')' and '{' ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Taluu, maybe it should consider some coding style to check during Travis CI build.

We can consider using PHP_CodeSniffer or PHP-CS-Fixer.

Do you have any idea about this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, adding this (with maybe building through GA instead of Travis) would be awesome. Not sure I have the time for that currently though, especially as I'm not really maintaining it (because not using it...) currently...

$this->handshake();
}

$protocol = 'http';
$errors = [null, null];
Expand Down Expand Up @@ -239,7 +241,7 @@ protected function handshake()
*/
protected function upgradeTransport()
{
$query = ['sid' => $this->session->id,
$query = ['sid' => $this->session->id ? $this->session->id : null,
'EIO' => $this->options['version'],
'transport' => static::TRANSPORT_WEBSOCKET];

Expand Down