Code Duplication    Length = 5-8 lines in 2 locations

fields/field.entry_relationship.php 1 location

@@ 740-744 (lines=5) @@
737
						}
738
						
739
						// current selection does not specify a mode
740
						if ($submodes == null) {
741
							$submodes = array_map(function ($fieldIncludableElement) use ($fieldName) {
742
								return FieldEntry_relationship::extractMode($fieldName, $fieldIncludableElement);
743
							}, $field->fetchIncludableElements());
744
						}
745
						
746
						foreach ($submodes as $submode) {
747
							$field->appendFormattedElement($item, $data, $encode, $submode, $eId);

lib/class.erfxsltutilities.php 1 location

@@ 145-152 (lines=8) @@
142
								$field->recursiveDeepness = $deepness;
143
							}
144
							
145
							if ($parentIncludableElementMode == null) {
146
								$submodes = array_map(function ($fieldIncludableElement) use ($fieldName) {
147
									return FieldEntry_relationship::extractMode($fieldName, $fieldIncludableElement);
148
								}, $field->fetchIncludableElements());
149
							}
150
							else {
151
								$submodes = array($parentIncludableElementMode);
152
							}
153
							
154
							foreach ($submodes as $submode) {
155
								$field->appendFormattedElement($xml, $filteredData, false, $submode, $entryId);