| Total Complexity | 3 | 
| Total Lines | 43 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 2 | ||
| Bugs | 1 | Features | 0 | 
| 1 | <?php  | 
            ||
| 9 | class SecurityMail extends Mailable  | 
            ||
| 10 | { | 
            ||
| 11 | use SerializesModels;  | 
            ||
| 12 | use Queueable;  | 
            ||
| 13 | |||
| 14 | protected $checkResult;  | 
            ||
| 15 | |||
| 16 | /**  | 
            ||
| 17 | * SecurityMail constructor.  | 
            ||
| 18 | *  | 
            ||
| 19 | * @param array $checkResult results from the Security Checker  | 
            ||
| 20 | */  | 
            ||
| 21 | 9 | public function __construct($checkResult)  | 
            |
| 24 | 9 | }  | 
            |
| 25 | |||
| 26 | /**  | 
            ||
| 27 | * Build the message.  | 
            ||
| 28 | *  | 
            ||
| 29 | * @return $this  | 
            ||
| 30 | */  | 
            ||
| 31 | 3 | public function build()  | 
            |
| 32 |     { | 
            ||
| 33 | 3 | $packageCount = count($this->checkResult);  | 
            |
| 34 | 3 |         $title = trans_choice('laravel-security-checker::messages.subject_new_vulnerabilities', $packageCount, [ | 
            |
| 35 | 2 | 'count' => $packageCount  | 
            |
| 36 | 1 | ]);  | 
            |
| 37 | 3 |         $subject = '['.config('app.name').'] '.$title; | 
            |
| 38 | |||
| 39 | 3 | return $this->subject($subject)  | 
            |
| 40 | 3 |             ->markdown('laravel-security-checker::security-mail', [ | 
            |
| 41 | 3 | 'title' => $title,  | 
            |
| 42 | 3 | 'packages' => $this->checkResult  | 
            |
| 43 | 1 | ]);  | 
            |
| 44 | }  | 
            ||
| 45 | |||
| 46 | /**  | 
            ||
| 47 | * @return array  | 
            ||
| 48 | */  | 
            ||
| 49 | 6 | public function getCheckResult()  | 
            |
| 52 | }  | 
            ||
| 53 | }  | 
            ||
| 54 |