@@ -16,28 +16,28 @@ class MessageFormat
1616 private ?string $ sendFormat = null ;
1717
1818 #[ORM \Column(name: 'astext ' , type: 'integer ' , options: ['default ' => 0 ])]
19- private int $ asText ;
19+ private bool $ asText ;
2020
2121 #[ORM \Column(name: 'ashtml ' , type: 'integer ' , options: ['default ' => 0 ])]
22- private int $ asHtml ;
22+ private bool $ asHtml ;
2323
2424 #[ORM \Column(name: 'aspdf ' , type: 'integer ' , options: ['default ' => 0 ])]
25- private int $ asPdf ;
25+ private bool $ asPdf ;
2626
2727 #[ORM \Column(name: 'astextandhtml ' , type: 'integer ' , options: ['default ' => 0 ])]
28- private int $ asTextAndHtml ;
28+ private bool $ asTextAndHtml ;
2929
3030 #[ORM \Column(name: 'astextandpdf ' , type: 'integer ' , options: ['default ' => 0 ])]
31- private int $ asTextAndPdf ;
31+ private bool $ asTextAndPdf ;
3232
3333 public function __construct (
3434 bool $ htmlFormatted ,
3535 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 ,
4141 ) {
4242 $ this ->htmlFormatted = $ htmlFormatted ;
4343 $ this ->sendFormat = $ sendFormat ;
@@ -58,27 +58,27 @@ public function getSendFormat(): ?string
5858 return $ this ->sendFormat ;
5959 }
6060
61- public function getAsText (): int
61+ public function isAsText (): bool
6262 {
6363 return $ this ->asText ;
6464 }
6565
66- public function getAsHtml (): int
66+ public function isAsHtml (): bool
6767 {
6868 return $ this ->asHtml ;
6969 }
7070
71- public function getAsTextAndHtml (): int
71+ public function isAsTextAndHtml (): bool
7272 {
7373 return $ this ->asTextAndHtml ;
7474 }
7575
76- public function getAsPdf (): int
76+ public function isAsPdf (): bool
7777 {
7878 return $ this ->asPdf ;
7979 }
8080
81- public function getAsTextAndPdf (): int
81+ public function isAsTextAndPdf (): bool
8282 {
8383 return $ this ->asTextAndPdf ;
8484 }
@@ -88,4 +88,34 @@ public function setSendFormat(?string $sendFormat): self
8888 $ this ->sendFormat = $ sendFormat ;
8989 return $ this ;
9090 }
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+ }
91121}
0 commit comments