Code Duplication    Length = 15-16 lines in 3 locations

src/wp-includes/SimplePie/Item.php 1 location

@@ 2898-2912 (lines=15) @@
2895
	 * @link http://www.georss.org/ GeoRSS
2896
	 * @return string|null
2897
	 */
2898
	public function get_latitude()
2899
	{
2900
		if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat'))
2901
		{
2902
			return (float) $return[0]['data'];
2903
		}
2904
		elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
2905
		{
2906
			return (float) $match[1];
2907
		}
2908
		else
2909
		{
2910
			return null;
2911
		}
2912
	}
2913
2914
	/**
2915
	 * Get the longitude coordinates for the item

src/wp-includes/SimplePie/Source.php 1 location

@@ 555-569 (lines=15) @@
552
		}
553
	}
554
555
	public function get_latitude()
556
	{
557
		if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat'))
558
		{
559
			return (float) $return[0]['data'];
560
		}
561
		elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
562
		{
563
			return (float) $match[1];
564
		}
565
		else
566
		{
567
			return null;
568
		}
569
	}
570
571
	public function get_longitude()
572
	{

src/wp-includes/class-simplepie.php 1 location

@@ 2587-2602 (lines=16) @@
2584
	 * @link http://www.georss.org/ GeoRSS
2585
	 * @return string|null
2586
	 */
2587
	public function get_latitude()
2588
	{
2589
2590
		if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat'))
2591
		{
2592
			return (float) $return[0]['data'];
2593
		}
2594
		elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match))
2595
		{
2596
			return (float) $match[1];
2597
		}
2598
		else
2599
		{
2600
			return null;
2601
		}
2602
	}
2603
2604
	/**
2605
	 * Get the longitude coordinates for the feed