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

Yoast / wordpress-seo / 5730cb79f488a5fed855d114b14f03b5a8cbf443

14 Jan 2025 01:34PM UTC coverage: 51.158%. First build
5730cb79f488a5fed855d114b14f03b5a8cbf443

Pull #21965

github

web-flow
Merge 8afb9bb5d into 9c6695675
Pull Request #21965: First run at a setup

0 of 103 new or added lines in 8 files covered. (0.0%)

16657 of 32560 relevant lines covered (51.16%)

3.96 hits per line

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

0.0
/src/dashboard/infrastructure/endpoints/search-rankings/top-page-endpoint.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong
3
// phpcs:disable Yoast.NamingConventions.NamespaceName.MaxExceeded
4
namespace Yoast\WP\SEO\Dashboard\Infrastructure\Endpoints\Search_Rankings;
5

6
use Exception;
7
use Yoast\WP\SEO\Dashboard\Domain\Endpoint\Endpoint_Interface;
8
use Yoast\WP\SEO\Dashboard\User_Interface\Search_Rankings\Abstract_Ranking_Route;
9
use Yoast\WP\SEO\Dashboard\User_Interface\Search_Rankings\Top_Page_Route;
10

11
/**
12
 * Represents the readability scores endpoint.
13
 */
14
class Top_Page_Endpoint implements Endpoint_Interface {
15

16
        /**
17
         * Gets the name.
18
         *
19
         * @return string
20
         */
NEW
21
        public function get_name(): string {
×
NEW
22
                return 'topPageResults';
×
23
        }
24

25
        /**
26
         * Gets the namespace.
27
         *
28
         * @return string
29
         */
NEW
30
        public function get_namespace(): string {
×
NEW
31
                return Abstract_Ranking_Route::ROUTE_NAMESPACE;
×
32
        }
33

34
        /**
35
         * Gets the route.
36
         *
37
         * @throws Exception If the route prefix is not overwritten this throws.
38
         * @return string
39
         */
NEW
40
        public function get_route(): string {
×
NEW
41
                return Top_Page_Route::get_route_prefix();
×
42
        }
43

44
        /**
45
         * Gets the URL.
46
         *
47
         * @return string
48
         */
NEW
49
        public function get_url(): string {
×
NEW
50
                return \rest_url( $this->get_namespace() . $this->get_route() );
×
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

© 2025 Coveralls, Inc