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

Yoast / wordpress-seo / a7886492b145fdf70261f7ca2cb0fbcb3562b15b

25 Nov 2024 01:47PM UTC coverage: 54.184% (-0.03%) from 54.215%
a7886492b145fdf70261f7ca2cb0fbcb3562b15b

Pull #21852

github

web-flow
Merge b930e736a into 16577a01e
Pull Request #21852: 339 dashboard use request to get the actual scores

7593 of 13670 branches covered (55.54%)

Branch coverage included in aggregate %.

0 of 77 new or added lines in 15 files covered. (0.0%)

989 existing lines in 3 files now uncovered.

29764 of 55275 relevant lines covered (53.85%)

41521.03 hits per line

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

0.0
/src/dashboard/infrastructure/endpoints/seo-scores-endpoint.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3
namespace Yoast\WP\SEO\Dashboard\Infrastructure\Endpoints;
4

5
use Exception;
6
use Yoast\WP\SEO\Dashboard\Domain\Endpoint\Endpoint_Interface;
7
use Yoast\WP\SEO\Dashboard\User_Interface\Scores\Abstract_Scores_Route;
8
use Yoast\WP\SEO\Dashboard\User_Interface\Scores\SEO_Scores_Route;
9

10
/**
11
 * Represents the SEO scores endpoint.
12
 */
13
class SEO_Scores_Endpoint implements Endpoint_Interface {
14

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

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

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

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