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

Yoast / wordpress-seo / 11ac475112e26d178724bf3efd8d3a60b09e9fc6

23 Oct 2025 01:08PM UTC coverage: 52.687% (-0.03%) from 52.713%
11ac475112e26d178724bf3efd8d3a60b09e9fc6

Pull #22669

github

web-flow
Merge 035233439 into f30559ff4
Pull Request #22669: Use context memoizer

8147 of 15270 branches covered (53.35%)

Branch coverage included in aggregate %.

0 of 40 new or added lines in 4 files covered. (0.0%)

5 existing lines in 1 file now uncovered.

31468 of 59920 relevant lines covered (52.52%)

39855.85 hits per line

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

0.0
/src/nlweb/schema-aggregator/application/aggregate-site-schema-command-handler.php
1
<?php
2

3
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
4
namespace Yoast\WP\SEO\Nlweb\Schema_Aggregator\Application;
5

6
use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer;
7
use Yoast\WP\SEO\NLWeb\Schema_Aggregator\Infrastructure\Schema_Piece_Repository;
8
use Yoast\WP\SEO\Nlweb\Schema_Aggregator\Infrastructure\To_Aggregate_Indexable_Collector;
9

10
/**
11
 * Class that handles the Aggregate_Site_Schema_Command.
12
 */
13
class Aggregate_Site_Schema_Command_Handler {
14

15
        /**
16
         * The Schema_Piece_Repository instance.
17
         *
18
         * @var Schema_Piece_Repository
19
         */
20
        private $schema_piece_repository;
21

22
        /**
23
         * Aggregate_Site_Schema_Command_Handler constructor.
24
         *
25
         * @param Schema_Piece_Repository    $schema_piece_repository    The collector of indexables that need to be aggregated.
26
         */
UNCOV
27
        public function __construct( Schema_Piece_Repository $schema_piece_repository ) {
×
UNCOV
28
                $this->schema_piece_repository    = $schema_piece_repository;
×
29
        }
30

31
        /**
32
         * Handles the Aggregate_Site_Schema_Command.
33
         *
34
         * @param Aggregate_Site_Schema_Command $command The command.
35
         *
36
         * @return array<string> The aggregated schema.
37
         */
NEW
38
        public function handle( Aggregate_Site_Schema_Command $command ): array {
×
39

40
                $schema_pieces = $this->schema_piece_repository->get(
×
41
                        $command->get_page_controls()->get_page(),
×
UNCOV
42
                        $command->get_page_controls()->get_page_size()
×
UNCOV
43
                );
×
44

45
                // This part should be replaced by the rest of the system.
NEW
46
                $schema = [];
×
47
                foreach ( $schema_pieces as $schema_piece ) {
×
48
                        $schema[] = $schema_piece->to_schema_array();
×
49
                }
UNCOV
50
                return $schema;
×
51
        }
52
}
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