<commit_before><?php
/**
 * Class to return the urls from a xml feed
 */
namespace Embed\Sources;

use Embed\Url;

class Feed extends Source implements SourceInterface {
	protected $url;
	protected $urls = array();

	static public function check (Url $Url) {
		switch ($Url->getMimeType()) {
			case 'text/xml':
			case 'text/html':
			case 'application/atom+xml':
			case 'application/rss+xml':
				return true;
		}

		return false;
	}

	public function __construct (Url $Url) {
		$Xml = $Url->getXMLContent();

		if (!$Xml) {
			throw new \Exception('The xml is not valid');
		}
<commit_msg>fix feed validator<commit_after><?php
/**
 * Class to return the urls from a xml feed
 */
namespace Embed\Sources;

use Embed\Url;

class Feed extends Source implements SourceInterface {
	protected $url;
	protected $urls = array();

	static public function check (Url $Url) {
		switch ($Url->getMimeType()) {
			case 'text/xml':
			case 'text/html':
			case 'application/xml':
			case 'application/atom+xml':
			case 'application/rss+xml':
				return true;
		}

		return false;
	}

	public function __construct (Url $Url) {
		$Xml = $Url->getXMLContent();

		if (!$Xml) {
			throw new \Exception('The xml is not valid');
		}

{'fraction_non_alphanumeric': 0.13628899835796388, 'fraction_numerical': 0.0, 'mean_word_length': 3.5655430711610485, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 11}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3789507', 'n_tokens_mistral': 438, 'n_tokens_neox': 393, 'n_words': 126}