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

AxeWP / wp-graphql-headless-login / #72

07 Jun 2025 09:08AM UTC coverage: 82.559% (-0.4%) from 82.929%
#72

push

php-coveralls

web-flow
Merge a58b52098 into fe4ece4d0

121 of 163 new or added lines in 26 files covered. (74.23%)

10 existing lines in 8 files now uncovered.

2291 of 2775 relevant lines covered (82.56%)

24.03 hits per line

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

94.74
/src/Type/Enum/ProviderEnum.php
1
<?php
2
/**
3
 * The Provider Enum.
4
 *
5
 * @package WPGraphQL\Login\Type\Enum
6
 * @since 0.0.1
7
 */
8

9
declare( strict_types = 1 );
10

11
namespace WPGraphQL\Login\Type\Enum;
12

13
use WPGraphQL\Login\Auth\ProviderRegistry;
14
use WPGraphQL\Login\Vendor\AxeWP\GraphQL\Abstracts\EnumType;
15
use WPGraphQL\Type\WPEnumType;
16

17
/**
18
 * Class - ProviderEnum
19
 */
20
class ProviderEnum extends EnumType {
21
        /**
22
         * {@inheritDoc}
23
         */
24
        public static function type_name(): string {
25
                return 'LoginProviderEnum';
67✔
26
        }
27

28
        /**
29
         * {@inheritDoc}
30
         */
31
        public static function get_description(): string {
UNCOV
32
                return __( 'The Headless Login Provider.', 'wp-graphql-headless-login' );
×
33
        }
34

35
        /**
36
         * {@inheritDoc}
37
         */
38
        public static function get_values(): array {
39
                $providers = ProviderRegistry::get_instance()->get_registered_providers();
68✔
40

41
                $values = [];
68✔
42
                foreach ( $providers as $provider ) {
68✔
43
                        $name = WPEnumType::get_safe_name( $provider::get_slug() );
67✔
44

45
                        $values[ $name ] = [
67✔
46
                                'value'       => $provider::get_slug(),
67✔
47
                                'description' => static fn () => sprintf(
67✔
48
                                        // translators: Headless Login provider name.
49
                                        __( 'The %s provider.', 'wp-graphql-headless-login' ),
67✔
50
                                        $provider::get_name()
67✔
51
                                ),
67✔
52
                        ];
67✔
53
                }
54

55
                if ( empty( $values ) ) {
68✔
56
                        $values['NONE'] = [
1✔
57
                                'value'       => 'none',
1✔
58
                                'description' => static fn () => __( 'No Login Providers are currently enabled.', 'wp-graphql-headless-login' ),
1✔
59
                        ];
1✔
60
                }
61

62
                return $values;
68✔
63
        }
64
}
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