customMail   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A build() 0 5 1
1
<?php
2
3
namespace App\Mail;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Mail\Mailable;
7
use Illuminate\Queue\SerializesModels;
8
9
class customMail extends Mailable
10
{
11
    use Queueable, SerializesModels;
12
13
    protected $body;
14
15
    public $subject;
16
17
    /**
18
     * Create a new message instance.
19
     *
20
     * @return void
21
     */
22
    public function __construct($subject, $body)
23
    {
24
        $this->subject = $subject;
25
        $this->body = $body;
26
    }
27
28
    /**
29
     * Build the message.
30
     *
31
     * @return $this
32
     */
33
    public function build()
34
    {
35
        $body = $this->body;
36
        $this->subject($this->subject);
37
        return $this->markdown('emails.customMail', compact("body"));
38
    }
39
}
40