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

Yoast / wordpress-seo / 512321137492bbae6803200cb9598c33529731ee

27 May 2025 10:27AM UTC coverage: 51.51% (-5.5%) from 56.997%
512321137492bbae6803200cb9598c33529731ee

Pull #22264

github

web-flow
Merge af47e48fa into 196182b4e
Pull Request #22264: Move and refactor ai generator helper

7875 of 14311 branches covered (55.03%)

Branch coverage included in aggregate %.

0 of 277 new or added lines in 16 files covered. (0.0%)

29138 of 57545 relevant lines covered (50.64%)

41488.84 hits per line

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

0.0
/src/ai-authorization/domain/token.php
1
<?php
2

3
namespace Yoast\WP\SEO\AI_Authorization\Domain;
4

5
/**
6
 * Class Token
7
 * Represents a token used for authentication with the AI Generator API.
8
 */
9
class Token {
10

11
        /**
12
         * The token value.
13
         *
14
         * @var string
15
         */
16
        private $value;
17

18
        /**
19
         * The expiration time.
20
         *
21
         * @var int
22
         */
23
        private $expiration;
24

25
        /**
26
         * Token constructor.
27
         *
28
         * @param string $value      The token value.
29
         * @param int    $expiration The expiration time.
30
         */
NEW
31
        public function __construct( string $value, int $expiration ) {
×
NEW
32
                $this->value      = $value;
×
NEW
33
                $this->expiration = $expiration;
×
34
        }
35

36
        /**
37
         * Get the token value.
38
         *
39
         * @return string The token value.
40
         */
NEW
41
        public function get_value(): string {
×
NEW
42
                return $this->value;
×
43
        }
44

45
        /**
46
         * Whether the token is expired.
47
         *
48
         * @return bool True if the token is expired, false otherwise.
49
         */
NEW
50
        public function is_expired(): bool {
×
NEW
51
                return $this->expiration < \time();
×
52
        }
53
}
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