# wordpress-seo/trunk/vendor_prefixed/guzzlehttp/guzzle/src/BodySummarizer.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version trunk. 24 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/trunk/code/vendor_prefixed/guzzlehttp/guzzle/src/BodySummarizer.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/trunk/raw/vendor_prefixed/guzzlehttp/guzzle/src/BodySummarizer.php
- Modified: 2025-12-02T13:31:04+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/wordpress-seo/trunk/code/vendor_prefixed/guzzlehttp/guzzle/src/BodySummarizer.php#L10-L20`.

```php
<?php

namespace YoastSEO_Vendor\GuzzleHttp;

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

```
