| Total Complexity | 4 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class EventAbstract implements EventInterface |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The name of the resource publishing this event |
||
| 9 | * @var string |
||
| 10 | */ |
||
| 11 | protected $resourceName; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * The name of this event |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $eventName; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Any data associated with this event |
||
| 21 | * @var mixed |
||
| 22 | */ |
||
| 23 | protected $data; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $resourceName name of the publisher |
||
| 27 | * @param string $eventName name of the event |
||
| 28 | * @param mixed $data [OPTIONAL] Additional event data |
||
| 29 | */ |
||
| 30 | public function __construct( |
||
| 31 | string $resourceName, |
||
| 32 | string $eventName, |
||
| 33 | $data = null |
||
| 34 | ) { |
||
| 35 | $this->resourceName = $resourceName; |
||
| 36 | $this->eventName = $eventName; |
||
| 37 | $this->data = $data; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * return the name of the event |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public function getEventName(): string |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * return the name of the resource |
||
| 52 | * |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function getResourceName(): string |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * return datas |
||
| 62 | * |
||
| 63 | * @return mixed |
||
| 64 | */ |
||
| 65 | public function getDatas() |
||
| 70 |