Passed
Push — master ( 26caeb...0e28f7 )
by Thomas
11:18
created

ComputeStudentLeadStatus   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 8
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php
2
3
namespace App\Listeners;
4
5
use Illuminate\Contracts\Queue\ShouldQueue;
6
use Illuminate\Queue\InteractsWithQueue;
7
8
class ComputeStudentLeadStatus
9
{
10
    public function handle($event)
11
    {
12
        // Get the student and update the lead status id
13
        $student = $event->enrollment->student;
14
        $student->lead_type_id = $student->lead_status();
15
        $student->save();
16
    }
17
}
18