Completed
Pull Request — master (#7)
by
unknown
02:24 queued 59s
created

BugMail   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 35
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A build() 0 5 1
1
<?php
2
3
namespace FlyingLuscas\BugNotifier\Mail;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Mail\Mailable;
7
use Illuminate\Queue\SerializesModels;
8
use Illuminate\Contracts\Queue\ShouldQueue;
9
10
class BugMail extends Mailable implements ShouldQueue
11
{
12
    use Queueable, SerializesModels;
13
14
    public $view;
15
    public $subject;
16
    public $body;
17
18
    /**
19
     * Create a new message instance.
20
     *
21
     * @param Illuminate\View\View $view
22
     * @param string $subject
23
     * @param string $body
24
     *
25
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
26
     */
27
    public function __construct($view, $subject, $body)
28
    {
29
        $this->view = $view;
30
        $this->subject = $subject;
31
        $this->body = $body;
32
    }
33
34
    /**
35
     * Build the message.
36
     *
37
     * @return $this
38
     */
39
    public function build()
40
    {
41
        return $this->view($this->view)
42
            ->subject($this->subject);
43
    }
44
}