Skip to content

Commit 8443338

Browse files
committed
Calculate size from strlen of contents when null
1 parent fa9de34 commit 8443338

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Testing/FakeMessage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public function uid(): int
3333
/**
3434
* {@inheritDoc}
3535
*/
36-
public function size(): ?int
36+
public function size(): int
3737
{
38-
return $this->size;
38+
return $this->size ?? strlen($this->contents);
3939
}
4040

4141
/**

0 commit comments

Comments
 (0)