| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | 6 | protected function loadRecord(Records\ARecord $record): bool |
|
| 36 | { |
||
| 37 | 6 | $this->clearSource(); |
|
| 38 | 6 | $matches = $this->findMatched($record); |
|
| 39 | 6 | if (empty($matches)) { // nothing found |
|
| 40 | 2 | return false; |
|
| 41 | } |
||
| 42 | |||
| 43 | 5 | reset($matches); |
|
| 44 | 5 | $dataLine = & $this->records[key($matches)]; |
|
| 45 | 5 | foreach ($this->getRelations() as $objectKey => $recordKey) { |
|
| 46 | 5 | $entry = $record->getEntry($objectKey); |
|
| 47 | 5 | $entry->setData($dataLine->offsetGet($objectKey), true); |
|
| 48 | } |
||
| 49 | 5 | return true; |
|
| 50 | } |
||
| 62 |