diff --git a/src/Message.php b/src/Message.php index 5561a513..19054bed 100644 --- a/src/Message.php +++ b/src/Message.php @@ -10,6 +10,11 @@ final class Message { + /** + * Default maximum allowed size of the short summary of the message body. + */ + public const BODY_SUMMARY_TRUNCATE_AT = 120; + /** * Returns the string representation of an HTTP message. * @@ -53,7 +58,7 @@ public static function toString(MessageInterface $message): string * @param MessageInterface $message The message to get the body summary * @param int $truncateAt The maximum allowed size of the summary */ - public static function bodySummary(MessageInterface $message, int $truncateAt = 120): ?string + public static function bodySummary(MessageInterface $message, int $truncateAt = self::BODY_SUMMARY_TRUNCATE_AT): ?string { $body = $message->getBody();