Completed
Push — master ( 284849...6c8a74 )
by Freek
01:15
created

CannotRenderTemplateMailable::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
namespace Spatie\MailTemplates\Exceptions;
4
5
use Exception;
6
use Spatie\MailTemplates\TemplateMailable;
7
use Spatie\MailTemplates\Models\MailTemplate;
8
9
class CannotRenderTemplateMailable extends Exception
10
{
11
    public static function layoutDoesNotContainABodyPlaceHolder(TemplateMailable $templateMailable, MailTemplate $mailTemplate, string $layoutHtml)
0 ignored issues
show
Unused Code introduced by
The parameter $mailTemplate is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $layoutHtml is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
12
    {
13
        $mailableClass = class_basename($templateMailable);
14
15
        return new static("The layout for mailable `{$mailableClass}` does not contain a `{{{ body }}}` placeholder");
16
    }
17
}
18