Change EventHandler to always pass by reference and kill return-value semantics.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user