TestMailable::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Resohead\LaravelTestMail;
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 TestMailable 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 Resohead\LaravelTestMail\TestMailable: $id, $relations, $class, $keyBy
Loading history...
13
14
    public $recipient;
15
16
    /**
17
     * Create a new message instance.
18
     *
19
     * @return void
20
     */
21 11
    public function __construct(String $recipient)
22
    {
23 11
        $this->recipient = $recipient;
24 11
    }
25
26
    /**
27
     * Build the message.
28
     *
29
     * @return $this
30
     */
31 10
    public function build()
32
    {
33 10
        return $this->subject('Test email from '. config('app.name'))
34 10
            ->to($this->recipient)
35 10
            ->markdown('laravel-test-mail::emails.test');
36
    }
37
}
38