Code Duplication    Length = 3-3 lines in 2 locations

model/DataObject.php 2 locations

@@ 2145-2147 (lines=3) @@
2142
		if($candidate) {
2143
			$relationName = null;
2144
			// Extract class and relation name from dot-notation
2145
			if(strpos($candidate, '.') !== false) {
2146
				list($candidate, $relationName) = explode('.', $candidate, 2);
2147
			}
2148
2149
			// If we've not already found the relation name from dot notation, we need to find a relation that points
2150
			// back to this class. As there's no dot-notation, there can only be one relation pointing to this class,
@@ 2216-2218 (lines=3) @@
2213
			$candidate = (isset($belongsManyMany[$component])) ? $belongsManyMany[$component] : null;
2214
			if($candidate) {
2215
				// Extract class and relation name from dot-notation
2216
				if(strpos($candidate, '.') !== false) {
2217
					list($candidate, $relationName) = explode('.', $candidate, 2);
2218
				}
2219
2220
				$childField = $candidate . "ID";
2221