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