| Conditions | 4 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | 12 | public static function getAdapter(APedigreeRecord $record): AEntryAdapter |
|
| 22 | { |
||
| 23 | 12 | if ($record instanceof File\PedigreeRecord) { |
|
| 24 | 9 | return new File\EntryAdapter(); |
|
| 25 | 3 | } elseif ($record instanceof SingleTable\PedigreeRecord) { |
|
| 26 | 1 | return new SingleTable\EntryAdapter(); |
|
| 27 | 2 | } elseif ($record instanceof MultiTable\PedigreeItemRecord) { |
|
| 28 | 1 | return new MultiTable\EntryAdapter(); |
|
| 29 | } else { |
||
| 30 | 1 | throw new PedigreeException('Unknown record for getting mapper'); |
|
| 31 | } |
||
| 34 |