| Conditions | 5 | 
| Paths | 5 | 
| Total Lines | 19 | 
| Code Lines | 16 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 17 | public function getTypeAttribute() | ||
| 18 |     { | ||
| 19 |         switch ($this->event_type) { | ||
| 20 | case ThreadCategoryWasChangedEvent::class: | ||
| 21 | return 'category'; | ||
| 22 | break; | ||
| 23 | case ThreadTitleWasChangedEvent::class: | ||
| 24 | return 'title'; | ||
| 25 | break; | ||
| 26 | case ThreadWasLockedEvent::class: | ||
| 27 | return 'locked'; | ||
| 28 | break; | ||
| 29 | case ThreadWasPinnedEvent::class: | ||
| 30 | return 'pinned'; | ||
| 31 | break; | ||
| 32 | default: | ||
| 33 | return 'unknown'; | ||
| 34 | } | ||
| 35 | } | ||
| 36 | |||
| 65 | 
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.