Code Duplication    Length = 9-9 lines in 2 locations

model/DataObject.php 2 locations

@@ 1857-1865 (lines=9) @@
1854
	 * @param bool $classOnly
1855
	 * @return array|null
1856
	 */
1857
	public function belongs_to($component = null, $classOnly = true) {
1858
		if($component) {
1859
			Deprecation::notice('4.0', 'Please use belongsToComponent() instead');
1860
			return $this->belongsToComponent($component, $classOnly);
1861
		}
1862
1863
		Deprecation::notice('4.0', 'Please use belongsTo() instead');
1864
		return $this->belongsTo(null, $classOnly);
1865
	}
1866
1867
	/**
1868
	 * Returns the class of a remote belongs_to relationship. If no component is specified a map of all components and
@@ 1955-1963 (lines=9) @@
1952
	 * @param bool $classOnly
1953
	 * @return array|null
1954
	 */
1955
	public function has_many($component = null, $classOnly = true) {
1956
		if($component) {
1957
			Deprecation::notice('4.0', 'Please use hasManyComponent() instead');
1958
			return $this->hasManyComponent($component, $classOnly);
1959
		}
1960
1961
		Deprecation::notice('4.0', 'Please use hasMany() instead');
1962
		return $this->hasMany(null, $classOnly);
1963
	}
1964
1965
	/**
1966
	 * Gets the class of a one-to-many relationship. If no $component is specified then an array of all the one-to-many