Conditions | 6 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 42 |
Changes | 0 |
1 | <?php |
||
28 | public function handle(JobSaved $event) |
||
29 | { |
||
30 | $job = $event->job; |
||
31 | |||
32 | //If job has just been created, log if its being published now |
||
33 | //If job is being modified, only want to log when it goes from unpublished to published |
||
34 | if ( ($job->wasRecentlyCreated && $job->published) || |
||
35 | (!$job->wasRecentlyCreated && $job->published && !$job->getOriginal('published'))) { |
||
36 | |||
37 | Log::notice('Job published: job {id='.$job->id."} published by manager {id=".$job->manager->id.", email=".$job->manager->user->email."}"); |
||
38 | } |
||
41 |