GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#59)
by joseph
18:36
created

CountryCodeFakerData   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 24
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 2
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\FakerData\String;
4
5
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\FakerData\AbstractFakerDataProvider;
6
7
class CountryCodeFakerData extends AbstractFakerDataProvider
8
{
9
    /**
10
     * @see https://github.com/symfony/symfony/issues/18263
11
     * @see \Symfony\Component\Intl\Data\Generator\RegionDataGenerator
12
     */
13
    public const EXCLUDED_COUNTRY_CODES = [
14
        'ZZ',
15
        'BV',
16
        'QO',
17
        'EU',
18
        'AN',
19
        'BV',
20
        'HM',
21
        'CP',
22
    ];
23
24 2
    public function __invoke()
25
    {
26
        do {
27 2
            $code = $this->generator->countryCode;
28 2
        } while (\in_array($code, self::EXCLUDED_COUNTRY_CODES, true));
29
30 2
        return $code;
31
    }
32
}
33