PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / vendor_prefixed / guzzlehttp / guzzle / src / BodySummarizer.php

BodySummarizer.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI trunk, at vendor_prefixed/guzzlehttp/guzzle/src/BodySummarizer.php

24 lines 732 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace YoastSEO_Vendor\GuzzleHttp;
4
5 use YoastSEO_Vendor\Psr\Http\Message\MessageInterface;
6 final class BodySummarizer implements \YoastSEO_Vendor\GuzzleHttp\BodySummarizerInterface
7 {
8 /**
9 * @var int|null
10 */
11 private $truncateAt;
12 public function __construct(?int $truncateAt = null)
13 {
14 $this->truncateAt = $truncateAt;
15 }
16 /**
17 * Returns a summarized message body.
18 */
19 public function summarize(\YoastSEO_Vendor\Psr\Http\Message\MessageInterface $message) : ?string
20 {
21 return $this->truncateAt === null ? \YoastSEO_Vendor\GuzzleHttp\Psr7\Message::bodySummary($message) : \YoastSEO_Vendor\GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt);
22 }
23 }
24