Passed
Push — feature/screen-candidates-emai... ( 13d7df )
by Yonathan
07:07 queued 02:02
created

ScreenCandidatesPrompt::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 9
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Mail;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Mail\Mailable;
7
use Illuminate\Queue\SerializesModels;
8
use Illuminate\Contracts\Queue\ShouldQueue;
9
use Illuminate\Support\Facades\Lang;
10
use Illuminate\Support\Facades\Log;
11
12
class ScreenCandidatesPrompt extends Mailable implements ShouldQueue
13
{
14
    use Queueable, SerializesModels;
15
16
    /**
17
     * The Job Poster instance.
18
     *
19
     * @var array
20
     */
21
    public $data;
22
23
    /**
24
     * Create a new message instance.
25
     *
26
     * @return void
27
     */
28
    public function __construct($data)
29
    {
30
        $this->data = $data;
31
    }
32
33
    /**
34
     * Build the message.
35
     *
36
     * @return $this
37
     */
38
    public function build()
39
    {
40
        $position = $this->data['position'];
41
        $classification = $this->data['classification'];
42
        $subject = Lang::get('common/notifications/screen_candidates.subject', [ 'position' => $position['en'], 'classification' => $classification ]) . '/ ' . Lang::get('common/notifications/screen_candidates.subject', [ 'position' => $position['en'], 'classification' => $classification ]);
43
44
        return $this->subject($subject)
45
                    ->cc($this->data['hr_advisors_emails'])
46
                    ->markdown('emails.job_posters.screen_candidates_plain', $this->data);
47
    }
48
}
49