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

Yoast / wordpress-seo / ea5cd67a2797d742742b15b1a3c7d7cf62fba21a

14 May 2025 12:12PM UTC coverage: 40.486%. First build
ea5cd67a2797d742742b15b1a3c7d7cf62fba21a

Pull #22253

github

web-flow
Merge 22e869160 into 88257803b
Pull Request #22253: Create the LLMs.txt automatically and on a schedule.

2176 of 7886 branches covered (27.59%)

Branch coverage included in aggregate %.

66 of 185 new or added lines in 13 files covered. (35.68%)

20121 of 47187 relevant lines covered (42.64%)

4.63 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