Skip to content

Commit f7f3c2b

Browse files
committed
changed parameters to be more generic
1 parent cc31313 commit f7f3c2b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/protocol/V4_3.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@
1616
*/
1717
class V4_3 extends V4_1
1818
{
19-
public function route(array $routing, ?array $bookmarks = null, ?string $database=null): array
19+
public function route(...$args): array
2020
{
21-
$this->write($this->packer->pack(0x66, (object) $routing, $bookmarks ?? [], $database));
21+
if (count($args) < 1) {
22+
throw new PackException('Wrong arguments count');
23+
}
24+
25+
$this->write($this->packer->pack(0x66, (object) $args[0], $args[1] ?? [], $args[2] ?? null));
2226

2327
$signature = 0;
2428
$output = $this->read($signature);

0 commit comments

Comments
 (0)