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

Yoast / wordpress-seo / dd6e866a9e6d253114633104d9e3858d807178ba

19 Jun 2024 10:03AM UTC coverage: 48.628% (-4.3%) from 52.936%
dd6e866a9e6d253114633104d9e3858d807178ba

push

github

web-flow
Merge pull request #21431 from Yoast/21429-update-copy-in-the-introduction-and-consent-modals

Updates the copy for the introduction and consent modals

7441 of 13454 branches covered (55.31%)

Branch coverage included in aggregate %.

0 of 3 new or added lines in 2 files covered. (0.0%)

3718 existing lines in 107 files now uncovered.

25100 of 53464 relevant lines covered (46.95%)

62392.47 hits per line

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

25.0
/src/main.php
1
<?php
2

3
namespace Yoast\WP\SEO;
4

5
use Yoast\WP\Lib\Abstract_Main;
6
use Yoast\WP\SEO\Dependency_Injection\Container_Compiler;
7
use Yoast\WP\SEO\Generated\Cached_Container;
8
use Yoast\WP\SEO\Surfaces\Classes_Surface;
9
use Yoast\WP\SEO\Surfaces\Helpers_Surface;
10
use Yoast\WP\SEO\Surfaces\Meta_Surface;
11

UNCOV
12
if ( ! \defined( 'WPSEO_VERSION' ) ) {
×
UNCOV
13
        \header( 'Status: 403 Forbidden' );
×
UNCOV
14
        \header( 'HTTP/1.1 403 Forbidden' );
×
UNCOV
15
        exit();
×
16
}
17

18
/**
19
 * Class Main.
20
 *
21
 * @property Classes_Surface $classes      The classes surface.
22
 * @property Meta_Surface    $meta         The meta surface.
23
 * @property Helpers_Surface $helpers      The helpers surface.
24
 */
25
class Main extends Abstract_Main {
26

27
        /**
28
         * The API namespace constant.
29
         *
30
         * @var string
31
         */
32
        public const API_V1_NAMESPACE = 'yoast/v1';
33

34
        /**
35
         * The WP CLI namespace constant.
36
         *
37
         * @var string
38
         */
39
        public const WP_CLI_NAMESPACE = 'yoast';
40

41
        /**
42
         * {@inheritDoc}
43
         */
44
        protected function get_container() {
2✔
45
                if ( $this->is_development() && \class_exists( '\Yoast\WP\SEO\Dependency_Injection\Container_Compiler' ) ) {
2✔
46
                        // Exception here is unhandled as it will only occur in development.
47
                        Container_Compiler::compile(
×
48
                                $this->is_development(),
×
49
                                __DIR__ . '/generated/container.php',
×
50
                                __DIR__ . '/../config/dependency-injection/services.php',
×
51
                                __DIR__ . '/../vendor/composer/autoload_classmap.php',
×
52
                                'Yoast\WP\SEO\Generated'
×
53
                        );
54
                }
55

56
                if ( \file_exists( __DIR__ . '/generated/container.php' ) ) {
2✔
57
                        require_once __DIR__ . '/generated/container.php';
2✔
58

59
                        return new Cached_Container();
2✔
60
                }
61

62
                return null;
×
63
        }
64

65
        /**
66
         * {@inheritDoc}
67
         */
68
        protected function get_name() {
×
69
                return 'yoast-seo';
×
70
        }
71

72
        /**
73
         * {@inheritDoc}
74
         */
75
        protected function get_surfaces() {
×
76
                return [
77
                        'classes' => Classes_Surface::class,
×
78
                        'meta'    => Meta_Surface::class,
79
                        'helpers' => Helpers_Surface::class,
80
                ];
81
        }
82
}
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