| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.2109 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace App\Http\Controllers; |
||
| 5 | 2 | public function index() |
|
| 6 | { |
||
| 7 | 2 | $name = trans('auth.guest'); |
|
| 8 | 2 | $userType = self::TRANSLATION_TAG_GUEST_USER; |
|
| 9 | |||
| 10 | /** @var \App\Models\User $user */ |
||
| 11 | 2 | if ($user = app('sentinel')->getUser()) { |
|
| 12 | $name = $user->name; |
||
| 13 | $userType = self::TRANSLATION_TAG_REGISTERED_USER; |
||
| 14 | } |
||
| 15 | |||
| 16 | 2 | return view('index', ['userType' => $userType, 'name' => $name]); |
|
| 17 | } |
||
| 18 | } |
||
| 19 |