Code Duplication    Length = 27-27 lines in 2 locations

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

@@ 503-529 (lines=27) @@
500
		}
501
	}
502
503
	public function get_copyright()
504
	{
505
		if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights'))
506
		{
507
			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
508
		}
509
		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright'))
510
		{
511
			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
512
		}
513
		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright'))
514
		{
515
			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
516
		}
517
		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights'))
518
		{
519
			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
520
		}
521
		elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights'))
522
		{
523
			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
524
		}
525
		else
526
		{
527
			return null;
528
		}
529
	}
530
531
	public function get_language()
532
	{

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

@@ 2503-2529 (lines=27) @@
2500
	 * @since 1.0 (previously called `get_feed_copyright()` since 0.8)
2501
	 * @return string|null
2502
	 */
2503
	public function get_copyright()
2504
	{
2505
		if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights'))
2506
		{
2507
			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_10_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
2508
		}
2509
		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright'))
2510
		{
2511
			return $this->sanitize($return[0]['data'], $this->registry->call('Misc', 'atom_03_construct_type', array($return[0]['attribs'])), $this->get_base($return[0]));
2512
		}
2513
		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright'))
2514
		{
2515
			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2516
		}
2517
		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights'))
2518
		{
2519
			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2520
		}
2521
		elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights'))
2522
		{
2523
			return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
2524
		}
2525
		else
2526
		{
2527
			return null;
2528
		}
2529
	}
2530
2531
	/**
2532
	 * Get the language for the feed