<commit_before><?php
/**
* RssBridgeFrandroid
* Returns the 5 newest posts from http://www.frandroid.com (full text)
* 2014-05-25
*
* @name Frandroid
* @homepage http://www.frandroid.com/
* @description Returns the 5 newest posts from Frandroid (full text)
* @maintainer cjohnson
*/
class FrandroidBridge extends BridgeAbstract{

    public function collectData(array $param){

    function FrandroidStripCDATA($string) {
        $string = str_replace('<![CDATA[', '', $string);
    	$string = str_replace(']]>', '', $string);
    	return $string;
    }
    function FrandroidExtractContent($url) {
	$html2 = file_get_html($url);
    $html3 = $html2->find('div.post-content', 0);
    $html3->find('div.no-sidebar-ad-top',0)->outertext='';
    $ret=$html3->find('div.shortcode-container');
    foreach ($ret as $value){
        $value->outertext='';
    }
    
    $html3->find('div#hrr-link',0)->outertext='';
	$text = $html3->innertext;
	$text = strip_tags($text, '<h1><span><h2><p><b><a><blockquote><img><em><ul><ol>');
	return $text;
    }
        $html = file_get_html('http://feeds.feedburner.com/Frandroid?format=xml') or $this->returnError('Could not request Frandroid.', 404);
	$limit = 0;

	foreach($html->find('item') as $element) {
	 if($limit < 5) {
	 $item = new \Item();
	 $item->title = FrandroidStripCDATA($element->find('title', 0)->innertext);
	 $item->uri = FrandroidStripCDATA($element->find('guid', 0)->plaintext);
	 $item->timestamp = strtotime($element->find('pubDate', 0)->plaintext);
	 $item->content = FrandroidExtractContent($item->uri);
	 $this->items[] = $item;
	 $limit++;
	 }
	}

    }

    public function getName(){
        return 'Frandroid';
    }

    public function getURI(){
        return 'http://www.frandroid.com/';
    }

    public function getCacheDuration(){
        return 300; // 5min
    }
}
<commit_msg>fixing indentation on FrandroidBridge<commit_after><?php
/**
 * RssBridgeFrandroid
 * Returns the 5 newest posts from http://www.frandroid.com (full text)
 * 2014-05-25
 *
 * @name Frandroid
 * @homepage http://www.frandroid.com/
 * @description Returns the 5 newest posts from Frandroid (full text)
 * @maintainer cjohnson
 */
class FrandroidBridge extends BridgeAbstract
{
    
    public function collectData(array $param)
    {
        
        function FrandroidStripCDATA($string)
        {
            $string = str_replace('<![CDATA[', '', $string);
            $string = str_replace(']]>', '', $string);
            return $string;
        }
        function FrandroidExtractContent($url)
        {
            $html2 = file_get_html($url);
            $html3 = $html2->find('div.post-content', 0);
            $html3->find('div.no-sidebar-ad-top', 0)->outertext = '';
            $ret = $html3->find('div.shortcode-container');
            foreach ($ret as $value) {
                $value->outertext = '';
            }
            
            $html3->find('div#hrr-link', 0)->outertext = '';
            $text = $html3->innertext;
            $text = strip_tags($text, '<h1><span><h2><p><b><a><blockquote><img><em><ul><ol>');
            return $text;
        }
        $html = file_get_html('http://feeds.feedburner.com/Frandroid?format=xml') or $this->returnError('Could not request Frandroid.', 404);
        $limit = 0;
        
        foreach ($html->find('item') as $element) {
            if ($limit < 5) {
                $item = new \Item();
                $item->title = FrandroidStripCDATA($element->find('title', 0)->innertext);
                $item->uri = FrandroidStripCDATA($element->find('guid', 0)->plaintext);
                $item->timestamp = strtotime($element->find('pubDate', 0)->plaintext);
                $item->content = FrandroidExtractContent($item->uri);
                $this->items[] = $item;
                $limit++;
            }
        }
        
    }
    
    public function getName()
    {
        return 'Frandroid';
    }
    
    public function getURI()
    {
        return 'http://www.frandroid.com/';
    }
    
    public function getCacheDuration()
    {
        return 300; // 5min
    }
}

{'fraction_non_alphanumeric': 0.17372262773722627, 'fraction_numerical': 0.01654501216545012, 'mean_word_length': 2.574782608695652, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 71, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 2}, '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': '1331822', 'n_tokens_mistral': 1341, 'n_tokens_neox': 1267, 'n_words': 240}