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

Contact   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 32
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 6 1
A __construct() 0 3 1
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