| Conditions | 3 | 
| Paths | 4 | 
| Total Lines | 15 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 12 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 38 | public function findRisFieldByType(string $type) | ||
| 39 |     { | ||
| 40 |         if (!array_key_exists($type, $this->mappings)) { | ||
| 41 | $type = $this->fallback; | ||
| 42 | } | ||
| 43 | |||
| 44 |         if (!array_key_exists($type, $this->mappings)) { | ||
| 45 | throw new \InvalidArgumentException(sprintf( | ||
| 46 | 'Missing mapping for fallback: "%s"', | ||
| 47 | $type | ||
| 48 | )); | ||
| 49 | } | ||
| 50 | |||
| 51 | return $this->mappings[$type]; | ||
| 52 | } | ||
| 53 | |||
| 70 |