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

Yoast / wordpress-seo / 49147a9298317c348c230ced25735413484fc905

12 May 2025 01:32PM UTC coverage: 40.208%. First build
49147a9298317c348c230ced25735413484fc905

Pull #22253

github

web-flow
Merge db5a40e65 into 1528b7da2
Pull Request #22253: Create the LLMs.txt automatically and on a schedule.

2124 of 7931 branches covered (26.78%)

Branch coverage included in aggregate %.

66 of 179 new or added lines in 13 files covered. (36.87%)

20064 of 47252 relevant lines covered (42.46%)

4.59 hits per line

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

0.0
/src/llms-txt/application/file/commands/remove-file-command-handler.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded
3
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong
4
namespace Yoast\WP\SEO\Llms_Txt\Application\File\Commands;
5

6
use Yoast\WP\SEO\Helpers\Options_Helper;
7
use Yoast\WP\SEO\Llms_Txt\Infrastructure\File\WordPress_File_System_Adapter;
8

9
/**
10
 * Handles the removal of the llms.txt
11
 */
12
class Remove_File_Command_Handler {
13

14
        /**
15
         * The options helper.
16
         *
17
         * @var Options_Helper
18
         */
19
        private $options_helper;
20

21
        /**
22
         * The file system adapter.
23
         *
24
         * @var WordPress_File_System_Adapter
25
         */
26
        private $file_system_adapter;
27

28
        /**
29
         * Constructor.
30
         *
31
         * @param Options_Helper                $options_helper      The options helper.
32
         * @param WordPress_File_System_Adapter $file_system_adapter The file system adapter.
33
         */
NEW
34
        public function __construct( Options_Helper $options_helper, WordPress_File_System_Adapter $file_system_adapter ) {
×
NEW
35
                $this->options_helper      = $options_helper;
×
NEW
36
                $this->file_system_adapter = $file_system_adapter;
×
37
        }
38

39
        /**
40
         * Runs the command.
41
         *
42
         * @return void
43
         */
NEW
44
        public function handle() {
×
NEW
45
                $this->file_system_adapter->remove_file();
×
46
                // Maybe move this to a class if we need to handle this option more often.
NEW
47
                $this->options_helper->set( 'llms_txt_content_hash', '' );
×
48
        }
49
}
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

© 2026 Coveralls, Inc