Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
36 | public function getText() |
||
37 | { |
||
38 | $text = ''; |
||
39 | foreach ($this->xmlField->Data->Object as $object) { |
||
40 | if ($object->SrcField) { // @codingStandardsIgnoreLine |
||
41 | // Field is a merge field, fetch text from source field |
||
42 | $sourceFieldName = (string) $object->SrcField->attributes()->SrcFieldName; // @codingStandardsIgnoreLine |
||
43 | $sourceField = $this->fieldParserRegistry->getParser($sourceFieldName); |
||
44 | $fieldText = $sourceField->getText(); |
||
45 | } else { |
||
46 | $fieldText = (string) $object->Default; // @codingStandardsIgnoreLine |
||
47 | } |
||
48 | |||
49 | $text .= $fieldText; |
||
50 | } |
||
51 | |||
52 | return $text; |
||
53 | } |
||
54 | } |
||
55 |