Test Failed
Push — master ( ed42d0...7405ac )
by Burak
04:45
created

DeleteNotificationsForm::deleteAllNotifications()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
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 7
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace App\Http\Livewire\Data;
4
5
use App\Models\User;
6
use Illuminate\Support\Facades\Auth;
7
use Livewire\Component;
8
9
class DeleteNotificationsForm extends Component
10
{
11
    public function deleteAllNotifications()
12
    {
13
        /**
14
         * @var User $user
15
         */
16
        $user = Auth::user();
17
        $user->notifications()->delete();
18
    }
19
20
    public function render()
21
    {
22
        return view('livewire.data.delete-notifications-form');
23
    }
24
}
25