Passed
Push — terms-contact ( f02a40...85a264 )
by Fèvre
05:16
created

Contact::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Xetaravel\Mail;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Contracts\Queue\ShouldQueue;
7
use Illuminate\Mail\Mailable;
8
use Illuminate\Queue\SerializesModels;
9
10
class Contact extends Mailable
11
{
12
    use Queueable, SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by Xetaravel\Mail\Contact: $id, $relations, $class, $keyBy
Loading history...
13
14
    /**
15
     *  The details of the mail.
16
     *
17
     * @var array
18
     */
19
    public $details;
20
21
    /**
22
     * Create a new message instance.
23
     *
24
     * @return void
25
     */
26
    public function __construct(array $details)
27
    {
28
        $this->details = $details;
29
    }
30
31
    /**
32
     * Build the message.
33
     *
34
     * @return $this
35
     */
36
    public function build()
37
    {
38
        return $this
39
                    ->from('[email protected]', 'Contact - Xetaravel')
40
                    ->subject($this->details['subject'])
41
                    ->view('emails.contact');
42
    }
43
}
44