TestMailable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 7
dl 0
loc 26
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

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