Test Failed
Push — master ( 7405ac...f937f1 )
by Burak
05:02
created

Index::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace App\Http\Livewire\Notification;
4
5
use Illuminate\Support\Facades\Auth;
6
use Livewire\Component;
7
8
class Index extends Component
9
{
10
    public function render()
11
    {
12
        return view('livewire.notification.index', [
13
            'notifications' => Auth::user()->unreadNotifications()->paginate(),
0 ignored issues
show
Bug introduced by
The method unreadNotifications() does not exist on Illuminate\Contracts\Auth\Authenticatable. It seems like you code against a sub-type of Illuminate\Contracts\Auth\Authenticatable such as Illuminate\Foundation\Auth\User. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

13
            'notifications' => Auth::user()->/** @scrutinizer ignore-call */ unreadNotifications()->paginate(),
Loading history...
14
        ]);
15
    }
16
}
17