1 | <?php |
||
12 | trait ProjectsEvents |
||
13 | { |
||
14 | use HandlesEvents; |
||
15 | |||
16 | public function getName(): string |
||
24 | |||
25 | public function rememberReceivedEvent(StoredEvent $storedEvent) |
||
29 | |||
30 | public function hasReceivedAllPriorEvents(StoredEvent $storedEvent): bool |
||
34 | |||
35 | public function hasReceivedAllEvents(): bool |
||
39 | |||
40 | public function getLastProcessedEventId(): int |
||
44 | |||
45 | public function lastEventProcessedAt(): Carbon |
||
49 | |||
50 | public function reset() |
||
60 | |||
61 | protected function getStatus(): ProjectorStatus |
||
65 | } |
||
66 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: