EmailAdminSummary::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace SET\Mail;
4
5
use Carbon\Carbon;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Contracts\Queue\ShouldQueue;
8
use Illuminate\Mail\Mailable;
9
use Illuminate\Queue\SerializesModels;
10
11
class EmailAdminSummary extends Mailable implements ShouldQueue
12
{
13
    use Queueable, SerializesModels;
14
15
    public $visits;
16
    public $records;
17
    public $destroyed;
18
    public $notes;
19
    public $monday;
20
    public $dutyLists;
21
22
    /**
23
     * EmailAdminSummary constructor.
24
     *
25
     * @param array $array
26
     */
27
    public function __construct(array $array)
28
    {
29
        $this->notes = $array['notes'];
30
        $this->visits = $array['visits'];
31
        $this->records = $array['records'];
32
        //$this->destroyed = $array['destroyed'];
33
        $this->dutyLists = $array['dutyLists'];
34
        $this->monday = Carbon::now()->startOfWeek();
35
    }
36
37
    /**
38
     * Build the message.
39
     *
40
     * @return $this
41
     */
42
    public function build()
43
    {
44
        return $this->view('emails.admin_reminder')
45
            ->subject('SET Weekly Report');
46
    }
47
}
48