1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace FH\Bundle\MailerBundle\Email; |
||
6 | |||
7 | use FH\Bundle\MailerBundle\Exception\InvalidArgumentException; |
||
0 ignored issues
–
show
|
|||
8 | |||
9 | final class MessageOptions |
||
10 | { |
||
11 | /** @var string|null */ |
||
12 | private $subject; |
||
13 | |||
14 | /** @var string|null */ |
||
15 | private $htmlTemplate; |
||
16 | |||
17 | /** @var string|null */ |
||
18 | private $textTemplate; |
||
19 | |||
20 | /** @var Participants */ |
||
21 | private $participants; |
||
22 | |||
23 | 1 | public static function fromArray(array $messageOptions): self |
|
24 | { |
||
25 | 1 | return new self( |
|
26 | 1 | $messageOptions['subject'], |
|
27 | 1 | $messageOptions['html_template'] ?? null, |
|
28 | 1 | $messageOptions['text_template'] ?? null, |
|
29 | 1 | Participants::fromArray($messageOptions['participants']) |
|
30 | ); |
||
31 | } |
||
32 | |||
33 | 1 | public function __construct( |
|
34 | ?string $subject, |
||
35 | ?string $htmlTemplate, |
||
36 | ?string $textTemplate, |
||
37 | Participants $participants |
||
38 | ) { |
||
39 | 1 | $this->subject = $subject; |
|
40 | 1 | $this->htmlTemplate = $htmlTemplate; |
|
41 | 1 | $this->textTemplate = $textTemplate; |
|
42 | 1 | $this->participants = $participants; |
|
43 | 1 | } |
|
44 | |||
45 | 1 | public function getSubject(): ?string |
|
46 | { |
||
47 | 1 | return $this->subject; |
|
48 | } |
||
49 | |||
50 | 1 | public function hasSubject(): bool |
|
51 | { |
||
52 | 1 | return \is_string($this->subject); |
|
53 | } |
||
54 | |||
55 | 1 | public function getHtmlTemplate(): ?string |
|
56 | { |
||
57 | 1 | return $this->htmlTemplate; |
|
58 | } |
||
59 | |||
60 | 1 | public function hasHtmlTemplate(): bool |
|
61 | { |
||
62 | 1 | return \is_string($this->htmlTemplate); |
|
63 | } |
||
64 | |||
65 | 1 | public function getTextTemplate(): ?string |
|
66 | { |
||
67 | 1 | return $this->textTemplate; |
|
68 | } |
||
69 | |||
70 | 1 | public function hasTextTemplate(): bool |
|
71 | { |
||
72 | 1 | return \is_string($this->textTemplate); |
|
73 | } |
||
74 | |||
75 | 1 | public function getParticipants(): Participants |
|
76 | { |
||
77 | 1 | return $this->participants; |
|
78 | } |
||
79 | } |
||
80 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths