@@ -16,28 +16,28 @@ class MessageFormat
16
16
private ?string $ sendFormat = null ;
17
17
18
18
#[ORM \Column(name: 'astext ' , type: 'integer ' , options: ['default ' => 0 ])]
19
- private int $ asText ;
19
+ private bool $ asText ;
20
20
21
21
#[ORM \Column(name: 'ashtml ' , type: 'integer ' , options: ['default ' => 0 ])]
22
- private int $ asHtml ;
22
+ private bool $ asHtml ;
23
23
24
24
#[ORM \Column(name: 'aspdf ' , type: 'integer ' , options: ['default ' => 0 ])]
25
- private int $ asPdf ;
25
+ private bool $ asPdf ;
26
26
27
27
#[ORM \Column(name: 'astextandhtml ' , type: 'integer ' , options: ['default ' => 0 ])]
28
- private int $ asTextAndHtml ;
28
+ private bool $ asTextAndHtml ;
29
29
30
30
#[ORM \Column(name: 'astextandpdf ' , type: 'integer ' , options: ['default ' => 0 ])]
31
- private int $ asTextAndPdf ;
31
+ private bool $ asTextAndPdf ;
32
32
33
33
public function __construct (
34
34
bool $ htmlFormatted ,
35
35
string $ sendFormat = null ,
36
- int $ asText = 0 ,
37
- int $ asHtml = 0 ,
38
- int $ asPdf = 0 ,
39
- int $ asTextAndHtml = 0 ,
40
- int $ asTextAndPdf = 0 ,
36
+ bool $ asText = false ,
37
+ bool $ asHtml = false ,
38
+ bool $ asPdf = false ,
39
+ bool $ asTextAndHtml = false ,
40
+ bool $ asTextAndPdf = false ,
41
41
) {
42
42
$ this ->htmlFormatted = $ htmlFormatted ;
43
43
$ this ->sendFormat = $ sendFormat ;
@@ -58,27 +58,27 @@ public function getSendFormat(): ?string
58
58
return $ this ->sendFormat ;
59
59
}
60
60
61
- public function getAsText (): int
61
+ public function isAsText (): bool
62
62
{
63
63
return $ this ->asText ;
64
64
}
65
65
66
- public function getAsHtml (): int
66
+ public function isAsHtml (): bool
67
67
{
68
68
return $ this ->asHtml ;
69
69
}
70
70
71
- public function getAsTextAndHtml (): int
71
+ public function isAsTextAndHtml (): bool
72
72
{
73
73
return $ this ->asTextAndHtml ;
74
74
}
75
75
76
- public function getAsPdf (): int
76
+ public function isAsPdf (): bool
77
77
{
78
78
return $ this ->asPdf ;
79
79
}
80
80
81
- public function getAsTextAndPdf (): int
81
+ public function isAsTextAndPdf (): bool
82
82
{
83
83
return $ this ->asTextAndPdf ;
84
84
}
@@ -88,4 +88,34 @@ public function setSendFormat(?string $sendFormat): self
88
88
$ this ->sendFormat = $ sendFormat ;
89
89
return $ this ;
90
90
}
91
+
92
+ public function setAsText (bool $ asText ): self
93
+ {
94
+ $ this ->asText = $ asText ;
95
+ return $ this ;
96
+ }
97
+
98
+ public function setAsHtml (bool $ asHtml ): self
99
+ {
100
+ $ this ->asHtml = $ asHtml ;
101
+ return $ this ;
102
+ }
103
+
104
+ public function setAsPdf (bool $ asPdf ): self
105
+ {
106
+ $ this ->asPdf = $ asPdf ;
107
+ return $ this ;
108
+ }
109
+
110
+ public function setAsTextAndHtml (bool $ asTextAndHtml ): self
111
+ {
112
+ $ this ->asTextAndHtml = $ asTextAndHtml ;
113
+ return $ this ;
114
+ }
115
+
116
+ public function setAsTextAndPdf (bool $ asTextAndPdf ): self
117
+ {
118
+ $ this ->asTextAndPdf = $ asTextAndPdf ;
119
+ return $ this ;
120
+ }
91
121
}
0 commit comments