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