Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
40 | public function current(): AggregateEvent |
||
41 | { |
||
42 | $event = $this->iterator->current(); |
||
43 | |||
44 | if (!$event instanceof AggregateEvent) { |
||
45 | throw new InvalidAggregateEventException(\sprintf( |
||
46 | 'Aggregate event collection only accepts %s, %s given', |
||
47 | AggregateEvent::class, |
||
48 | \is_object($event) ? \get_class($event) : \gettype($event) |
||
49 | )); |
||
50 | } |
||
51 | |||
52 | return $event; |
||
53 | } |
||
54 | |||
89 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.