[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:
Chris Boden 2012-07-22 20:00:25 -04:00
parent 6ee81074d3
commit 491d0c779c
3 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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() {