Change EventHandler to always pass by reference and kill return-value semantics.

This commit is contained in:
Austen McDonald
2016-08-01 06:52:36 +00:00
parent 318531c6ad
commit 1d24aa973f
4 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ class EventManagerTestInvalidSubscriber
class EventManagerTestSubscriber implements EventHandler
{
public static function handleEvent(string $event, array $context) {}
public static function handleEvent(string $event, array &$context) {}
}
class EventManagerTest extends ModelTestCase
+1 -1
View File
@@ -6,7 +6,7 @@ use LotGD\Core\Game;
use LotGD\Core\Module as ModuleBase;
class Module implements ModuleBase {
public static function handleEvent(string $event, array $context) {
public static function handleEvent(string $event, array &$context) {
$context['foo'] = 'baz';
return $context;
}