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