| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | 1 | public function findISOCode(?string $string = null): ?string |
|
| 33 | { |
||
| 34 | 1 | $string = (string) $string; |
|
| 35 | 1 | if (($key = array_search($string, $this->list))) { |
|
| 36 | 1 | return $key; |
|
| 37 | } |
||
| 38 | 1 | $string = strtoupper($string); |
|
| 39 | 1 | if (array_key_exists($string, $this->list)) { |
|
| 40 | 1 | return $string; |
|
| 41 | } |
||
| 42 | |||
| 43 | 1 | return null; |
|
| 44 | } |
||
| 46 |