Conditions | 2 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.0932 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
24 | 2 | public function __invoke() |
|
25 | { |
||
26 | //to prevent issues when using as an archetype, otherwise this gets replaced with the new field property name |
||
27 | 2 | $property = 'country' . 'Code'; |
|
28 | do { |
||
29 | 2 | $code = $this->generator->$property; |
|
30 | 2 | } while (\in_array($code, self::EXCLUDED_CODES, true)); |
|
31 | |||
32 | 2 | return $code; |
|
33 | } |
||
35 |