Code Duplication    Length = 3-3 lines in 2 locations

model/DataObject.php 2 locations

@@ 2069-2071 (lines=3) @@
2066
		if($candidate) {
2067
			$relationName = null;
2068
			// Extract class and relation name from dot-notation
2069
			if(strpos($candidate, '.') !== false) {
2070
				list($candidate, $relationName) = explode('.', $candidate, 2);
2071
			}
2072
2073
			// If we've not already found the relation name from dot notation, we need to find a relation that points
2074
			// back to this class. As there's no dot-notation, there can only be one relation pointing to this class,
@@ 2166-2168 (lines=3) @@
2163
			$candidate = (isset($belongsManyMany[$component])) ? $belongsManyMany[$component] : null;
2164
			if($candidate) {
2165
				// Extract class and relation name from dot-notation
2166
				if(strpos($candidate, '.') !== false) {
2167
					list($candidate, $relationName) = explode('.', $candidate, 2);
2168
				}
2169
2170
				$childField = $candidate . "ID";
2171