NotifyThreadSubscribers   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php
2
3
namespace Seongbae\Discuss\Listeners;
4
5
use Illuminate\Support\Facades\Log;
6
use Notification;
7
use Seongbae\Discuss\Events\NewReply;
8
use Seongbae\Discuss\Notifications\NewReplyNotification;
9
use Auth;
10
11
class NotifyThreadSubscribers
12
{
13
    public function handle(NewReply $event)
14
    {
15
        $subject = $event->getReply()->user->name." replied \"".limitText($event->getReply()->body, 40)."\"";
16
17
        Notification::send($event->getReply()->thread->subscribersExcept, new NewReplyNotification($event->getReply(), $subject));
18
    }
19
}
20