| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 53 | public function getText() |
||
| 54 | { |
||
| 55 | $text = ''; |
||
| 56 | foreach ($this->xmlField->Data->Object as $object) { |
||
| 57 | if ($object->SrcField) { // @codingStandardsIgnoreLine |
||
| 58 | // Field is a merge field, fetch text from source field |
||
| 59 | $sourceFieldName = (string) $object->SrcField->attributes()->SrcFieldName; // @codingStandardsIgnoreLine |
||
| 60 | $sourceField = $this->fieldParserRegistry->getParser($sourceFieldName); |
||
| 61 | $fieldText = $sourceField->getText(); |
||
|
|
|||
| 62 | } else { |
||
| 63 | $fieldText = (string) $object->Default; // @codingStandardsIgnoreLine |
||
| 64 | } |
||
| 65 | |||
| 66 | $text .= $fieldText; |
||
| 67 | } |
||
| 68 | |||
| 69 | return $text; |
||
| 70 | } |
||
| 72 |