# media-cloud-sync/1.4.2/includes/sdk/google/guzzlehttp/guzzle/src/BodySummarizer.php

Media Cloud Sync, version 1.4.2. 24 lines.

- Page: https://pluginprobe.com/plugins/media-cloud-sync/1.4.2/code/includes/sdk/google/guzzlehttp/guzzle/src/BodySummarizer.php
- Raw: https://pluginprobe.com/plugins/media-cloud-sync/1.4.2/raw/includes/sdk/google/guzzlehttp/guzzle/src/BodySummarizer.php
- Modified: 2026-05-26T18:20:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/media-cloud-sync/1.4.2/code/includes/sdk/google/guzzlehttp/guzzle/src/BodySummarizer.php#L10-L20`.

```php
<?php

namespace Dudlewebs\WPMCS\GCP\GuzzleHttp;

use Dudlewebs\WPMCS\GCP\Psr\Http\Message\MessageInterface;
final class BodySummarizer implements BodySummarizerInterface
{
    /**
     * @var int|null
     */
    private $truncateAt;
    public function __construct(?int $truncateAt = null)
    {
        $this->truncateAt = $truncateAt;
    }
    /**
     * Returns a summarized message body.
     */
    public function summarize(MessageInterface $message) : ?string
    {
        return $this->truncateAt === null ? Psr7\Message::bodySummary($message) : Psr7\Message::bodySummary($message, $this->truncateAt);
    }
}

```
