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

Commit 33322fd

Browse files
authored
Merge pull request repejota#109 from ingosus/enc
Fixed unnecessary extra encoding
2 parents 4959e9d + 3412521 commit 33322fd

4 files changed

Lines changed: 6 additions & 15 deletions

File tree

src/Nats/EncodedConnection.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,6 @@ public function __construct(ConnectionOptions $options = null, Encoder $encoder
3131
parent::__construct($options);
3232
}
3333

34-
/**
35-
* Request does a request and executes a callback with the response.
36-
*
37-
* @param string $subject Message topic.
38-
* @param string $payload Message data.
39-
* @param \Closure $callback Closure to be executed as callback.
40-
*
41-
* @return void
42-
*/
43-
public function request($subject, $payload, \Closure $callback)
44-
{
45-
$payload = $this->encoder->encode($payload);
46-
parent::request($subject, $payload, $callback);
47-
}
48-
4934
/**
5035
* Publish publishes the data argument to the given subject.
5136
*

test/Encoders/JSONEncoderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,7 @@ function ($res) {
5757
$this->assertEquals('Hello, McFly !!!', $res->getBody());
5858
}
5959
);
60+
61+
$this->c->wait(1);
6062
}
6163
}

test/Encoders/PHPEncoderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,7 @@ function ($res) {
5757
$this->assertEquals('Hello, McFly !!!', $res->getBody());
5858
}
5959
);
60+
61+
$this->c->wait(1);
6062
}
6163
}

test/Encoders/YAMLEncoderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,7 @@ function ($res) {
6161
$this->assertEquals('Hello, McFly !!!', $res->getBody());
6262
}
6363
);
64+
65+
$this->c->wait(1);
6466
}
6567
}

0 commit comments

Comments
 (0)