• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / 481faf637ba3a7c1e5f2bfef59b582ac39523de6

21 May 2025 09:11AM UTC coverage: 46.174%. First build
481faf637ba3a7c1e5f2bfef59b582ac39523de6

Pull #22291

github

web-flow
Merge pull request #22278 from Yoast/577-sanitize-and-deal-with-special-markdown-characters-before-writing-to-file

577 sanitize and deal with special markdown characters before writing to file
Pull Request #22291: Introduce the llms.txt feature

52 of 403 new or added lines in 30 files covered. (12.9%)

15586 of 33755 relevant lines covered (46.17%)

3.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/llms-txt/infrastructure/markdown-services/title-adapter.php
1
<?php
2

3
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong
4
namespace Yoast\WP\SEO\Llms_Txt\Infrastructure\Markdown_Services;
5

6
use Yoast\WP\SEO\Llms_Txt\Domain\Markdown\Sections\Title;
7
use Yoast\WP\SEO\Services\Health_Check\Default_Tagline_Runner;
8

9
/**
10
 * The adapter of the title.
11
 */
12
class Title_Adapter {
13

14
        /**
15
         * The default tagline runner.
16
         *
17
         * @var Default_Tagline_Runner
18
         */
19
        private $default_tagline_runner;
20

21
        /**
22
         * Class constructor.
23
         *
24
         * @param Default_Tagline_Runner $default_tagline_runner The default tagline runner.
25
         */
NEW
26
        public function __construct(
×
27
                Default_Tagline_Runner $default_tagline_runner
28
        ) {
NEW
29
                $this->default_tagline_runner = $default_tagline_runner;
×
30
        }
31

32
        /**
33
         * Gets the title.
34
         *
35
         * @return Title The title.
36
         */
NEW
37
        public function get_title(): Title {
×
NEW
38
                $this->default_tagline_runner->run();
×
NEW
39
                $tagline = ( $this->default_tagline_runner->is_successful() ? \get_bloginfo( 'description' ) : '' );
×
40

NEW
41
                return new Title( \get_bloginfo( 'name' ), $tagline );
×
42
        }
43
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc