[WAMP] Removed default var from onPublish
Removed default array being set on WampServerInterface::onPublish These methods are called by Ratchet's event components Ratchet will never pass null values This removes excess requirements from the end developer
This commit is contained in:
parent
6ee81074d3
commit
491d0c779c
@ -67,7 +67,7 @@ class TopicManager implements WsServerInterface, WampServerInterface {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function onPublish(ConnectionInterface $conn, $topic, $event, array $exclude = array(), array $eligible = array()) {
|
||||
public function onPublish(ConnectionInterface $conn, $topic, $event, array $exclude, array $eligible) {
|
||||
$this->app->onPublish($conn, $this->getTopic($topic), $event, $exclude, $eligible);
|
||||
}
|
||||
|
||||
|
@ -39,5 +39,5 @@ interface WampServerInterface extends ComponentInterface {
|
||||
* @param array A list of session IDs the message should be excluded from (blacklist)
|
||||
* @param array A list of session Ids the message should be send to (whitelist)
|
||||
*/
|
||||
function onPublish(ConnectionInterface $conn, $topic, $event, array $exclude = array(), array $eligible = array());
|
||||
function onPublish(ConnectionInterface $conn, $topic, $event, array $exclude, array $eligible);
|
||||
}
|
@ -144,7 +144,7 @@ class TopicManagerTest extends \PHPUnit_Framework_TestCase {
|
||||
, $this->isType('array')
|
||||
);
|
||||
|
||||
$this->mngr->onPublish($this->conn, 'topic coverage', $msg);
|
||||
$this->mngr->onPublish($this->conn, 'topic coverage', $msg, array(), array());
|
||||
}
|
||||
|
||||
public function testOnCloseBubbles() {
|
||||
|
Loading…
Reference in New Issue
Block a user