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::__invoke()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 1
nop 0
crap 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