Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit df20ddc

Browse files
committed
Changed method toJson to the method __toString. Same behaviour
1 parent 7e1a7f2 commit df20ddc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public function isConnected()
178178
public function connect()
179179
{
180180
$this->streamSocket = $this->getStream($this->options->getAddress());
181-
$msg = 'CONNECT '.$this->options->toJSON();
181+
$msg = 'CONNECT '.$this->options;
182182
$this->send($msg);
183183
}
184184

src/ConnectionOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function getAddress()
8585
*
8686
* @return string
8787
*/
88-
public function toJSON()
88+
public function __toString()
8989
{
9090
$a = [
9191
"lang" => $this->lang,

0 commit comments

Comments
 (0)