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

Yoast / wordpress-seo / 8dbb17dd027bdca8154ad419c37e397e58556d21

12 May 2026 10:00AM UTC coverage: 51.862%. First build
8dbb17dd027bdca8154ad419c37e397e58556d21

push

github

vraja-pro
Merge branch 'trunk' into feature/editor-focus-keyphrase-redesign

1899 of 3333 branches covered (56.98%)

Branch coverage included in aggregate %.

1142 of 2108 new or added lines in 60 files covered. (54.17%)

6040 of 11975 relevant lines covered (50.44%)

251201.9 hits per line

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

0.0
/src/myyoast-client/application/exceptions/authorization-flow-exception.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3

4
namespace Yoast\WP\SEO\MyYoast_Client\Application\Exceptions;
5

6
use RuntimeException;
7
use Throwable;
8

9
/**
10
 * Exception thrown when the authorization flow cannot be started.
11
 *
12
 * Wraps underlying failures (registration, discovery, invalid parameters)
13
 * that prevent building the authorization URL.
14
 */
15
class Authorization_Flow_Exception extends RuntimeException {
16

17
        /**
18
         * The error code identifying the failure reason.
19
         *
20
         * @var string
21
         */
22
        private $error_code;
23

24
        /**
25
         * Authorization_Flow_Exception constructor.
26
         *
27
         * @param string         $error_code        The error code.
28
         * @param string         $error_description A human-readable description.
29
         * @param int            $code              The exception code.
30
         * @param Throwable|null $previous          The previous exception.
31
         */
NEW
32
        public function __construct( string $error_code, string $error_description = '', int $code = 0, ?Throwable $previous = null ) {
×
NEW
33
                $this->error_code = $error_code;
×
34

NEW
35
                $message = $error_code;
×
NEW
36
                if ( $error_description !== '' ) {
×
NEW
37
                        $message .= ': ' . $error_description;
×
38
                }
39

NEW
40
                parent::__construct( $message, $code, $previous );
×
41
        }
42

43
        /**
44
         * Returns the error code.
45
         *
46
         * @return string
47
         */
NEW
48
        public function get_error_code(): string {
×
NEW
49
                return $this->error_code;
×
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

© 2026 Coveralls, Inc