| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 1 | public function index($type = null) |
|
| 20 | { |
||
| 21 | |||
| 22 | $notifications = $this->api->be(auth()->user())->get('/api/notifications/'.$type); |
||
| 23 | if ($type === 'archive') { |
||
| 24 | $page = ''; |
||
| 25 | $button = 'Notifications'; |
||
| 26 | $bg = 'maroon'; |
||
| 27 | 1 | } |
|
| 28 | else { |
||
| 29 | $page = 'archive'; |
||
| 30 | 1 | $button = 'Archive'; |
|
| 31 | 1 | $bg = 'blue'; |
|
| 32 | 1 | } |
|
| 33 | 1 | ||
| 34 | 1 | return view('notifications.list', compact(['notifications', 'page', 'button', 'bg', "type"])); |
|
| 35 | 1 | } |
|
| 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.