From 1e822f62454bdf0fee4d4f3856164ac6c6c4810e Mon Sep 17 00:00:00 2001 From: dereuromark Date: Sat, 16 Dec 2017 22:50:53 +0100 Subject: [PATCH] Add missing EventInterface to ease future typehinting using interfaces. --- src/Event/Event.php | 12 +---- src/Event/EventInterface.php | 89 ++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 11 deletions(-) create mode 100644 src/Event/EventInterface.php diff --git a/src/Event/Event.php b/src/Event/Event.php index f731185182d..1570295da43 100644 --- a/src/Event/Event.php +++ b/src/Event/Event.php @@ -14,17 +14,7 @@ */ namespace Cake\Event; -/** - * Represents the transport class of events across the system. It receives a name, subject and an optional - * payload. The name can be any string that uniquely identifies the event across the application, while the subject - * represents the object that the event applies to. - * - * @property string $name (deprecated) Name of the event - * @property object $subject (deprecated) The object this event applies to - * @property mixed $result (deprecated) Property used to retain the result value of the event listeners - * @property array $data (deprecated) Custom data for the method that receives the event - */ -class Event +class Event implements EventInterface { /** diff --git a/src/Event/EventInterface.php b/src/Event/EventInterface.php new file mode 100644 index 00000000000..4733ccea614 --- /dev/null +++ b/src/Event/EventInterface.php @@ -0,0 +1,89 @@ +