Conditions | 2 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
41 | 4 | private function getCountryCode(): string |
|
42 | { |
||
43 | //to prevent issues when using as an archetype, otherwise this gets replaced with the new field property name |
||
44 | 4 | $property = 'country' . 'Code'; |
|
45 | do { |
||
46 | 4 | $code = $this->generator->$property; |
|
47 | 4 | } while (\in_array($code, self::EXCLUDED_CODES, true)); |
|
48 | |||
49 | 4 | return $code; |
|
50 | } |
||
57 |