Skip to content

Commit 27ea6ed

Browse files
committed
Remove the emit method from IEventReceiver
Also make the library compatible with PHP 8
1 parent 0354d4f commit 27ea6ed

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^7.1.10"
13+
"php": ">=7.1.10"
1414
},
1515
"keywords": [
1616
"stream",
@@ -22,4 +22,4 @@
2222
"ElementaryFramework\\Core\\Events\\": "src/Core/Events/"
2323
}
2424
}
25-
}
25+
}

src/Core/Events/IEventEmitter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ interface IEventEmitter
5151
* @return void
5252
*/
5353
function emit(int $event, ...$params);
54-
}
54+
}

src/Core/Events/IEventReceiver.php

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,5 @@ interface IEventReceiver
4949
*
5050
* @return void
5151
*/
52-
function on(int $event, callable $callback) : void;
53-
54-
/**
55-
* Emit an event.
56-
*
57-
* @param integer $event The event to emit.
58-
* @param array $callbacks The buffer of events callbacks.
59-
* @param mixed[] $params The list of parameters to pass to the callback.
60-
*
61-
* @return void
62-
*/
63-
function emit(int $event, ...$params);
64-
}
52+
function on(int $event, callable $callback): void;
53+
}

0 commit comments

Comments
 (0)