DatabaseNotificationCollection::markAsRead()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
ccs 0
cts 6
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Illuminate\Notifications;
4
5
use Illuminate\Database\Eloquent\Collection;
6
7
class DatabaseNotificationCollection extends Collection
8
{
9
    /**
10
     * Mark all notification as read.
11
     *
12
     * @return void
13
     */
14
    public function markAsRead()
15
    {
16
        $this->each(function ($notification) {
17
            $notification->markAsRead();
18
        });
19
    }
20
}
21