Skip to content

Commit 848854f

Browse files
authored
Fix isHtml, isText, and body methods
Also a quick semantic update to isValid
1 parent d0d300b commit 848854f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/InboundEmail.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,16 @@ public function body()
164164

165165
public function isHtml()
166166
{
167-
return empty($this->html());
167+
return !empty($this->html());
168168
}
169169

170170
public function isText()
171171
{
172-
return empty($this->text());
172+
return !empty($this->text());
173173
}
174174

175175
public function isValid(): bool
176176
{
177-
return $this->from() !== '' && ($this->text() !== '' || $this->html() !== '');
177+
return $this->from() !== '' && ($this->isText()|| $this->isHtml());
178178
}
179179
}

0 commit comments

Comments
 (0)