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

Yoast / wordpress-seo / 6987097851

25 Nov 2023 04:49AM UTC coverage: 49.206% (-0.1%) from 49.302%
6987097851

push

github

web-flow
Merge pull request #20878 from Yoast/JRF/ghactions-minor-tweak

GH Actions: update a few links in inline comments

15305 of 31104 relevant lines covered (49.21%)

4.03 hits per line

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

31.25
/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

12
if ( ! \defined( 'WPSEO_VERSION' ) ) {
13
        \header( 'Status: 403 Forbidden' );
14
        \header( 'HTTP/1.1 403 Forbidden' );
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
        const API_V1_NAMESPACE = 'yoast/v1';
33

34
        /**
35
         * The WP CLI namespace constant.
36
         *
37
         * @var string
38
         */
39
        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