Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 10
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
PipelineEmail
0.00% covered (danger)
0.00%
0 / 10
0.00% covered (danger)
0.00%
0 / 3
12
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 build
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
2
 attachments
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace App\Mail;
4
5use Illuminate\Bus\Queueable;
6use Illuminate\Mail\Mailable;
7use Illuminate\Queue\SerializesModels;
8
9class PipelineEmail extends Mailable
10{
11    use Queueable, SerializesModels;
12
13    private string $result;
14    private string $msg;
15
16    /**
17     * Create a new message instance.
18     *
19     * @return void
20     */
21    public function __construct($result, $msg)
22    {
23        $this->result = $result;
24        $this->msg    = $msg;
25    }
26
27    /**
28     * Get the message content definition.
29     *
30     * @return PipelineEmail
31     */
32    public function build(): PipelineEmail
33    {
34        return $this->from(env('MAIL_USERNAME'), env('MAIL_FROM_NAME'))
35            ->subject($this->result)
36            ->view('mail.pipeline')
37            ->with([
38                'result' => $this->result,
39                'msg'    => str_replace("\n", '<br>', $this->msg)
40            ]);
41    }
42
43    /**
44     * Get the attachments for the message.
45     *
46     * @return array
47     */
48    public function attachments(): array
49    {
50        return [];
51    }
52}