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

ComputeStudentLeadStatus::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 10
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