<commit_before><?php

namespace Service\RSS;

class RSS
{
    /**
     * @var Channel
     */
    private $channel;

    /**
     * @var Array
     */
    private $tweets;

    /**
     * @return Channel
     */
    public function getChannel()
    {
        return $this->channel;
    }

    /**
     * @param Channel $channel
     * @return RSS
     */
    public function setChannel($channel)
    {
        $this->channel = $channel;
        return $this;
    }

    /**
     * @return Array
     */
    public function getTweets()
    {
        return $this->tweets;
    }

    /**
     * @param Array $tweets
     * @return RSS
     */
    public function setTweets(Array $tweets)
    {
        $this->tweets = $tweets;
        return $this;
    }

    public function addTweet(Tweet $tweet)
    {
        $this->tweets[] = $tweet;
        return $this;
    }

    public function parseTimeline($timeline)
    {
        foreach ($timeline as $tweet) {
            $item = new Tweet();
            $item->setId($tweet->id)
                ->setTitle($tweet->text)
                ->setDescription($tweet->text)
                ->setPubDate($tweet->created_at)
                ->setPlace($tweet->place)
                ->setUsername($tweet->user->screen_name)
                ->setUserId($tweet->user->id)
            ;
            $this->addTweet($item);
        }
    }

    /**
     * @return string
     */
    public function toXML()
    {
        $xml  = '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL;
        $xml .= '<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:georss="http://www.georss.org/georss" xmlns:twitter="http://api.twitter.com" version="2.0">'  . PHP_EOL;
        $xml .=     "\t<channel>" . PHP_EOL;
        $xml .= $this->getChannel()
            ->toXML()
        ;
        foreach ($this->tweets as $tweet) {
            $xml .= "\t\t<item>" . PHP_EOL;
            $xml .= $tweet->toXML();
            $xml .= "\t\t</item>" . PHP_EOL;
        }
        $xml .=     "\t</channel>" . PHP_EOL;
        $xml .= '</rss>';

        return $xml;
    }
}<commit_msg>Fix end punctuation to be together with method call<commit_after><?php

namespace Service\RSS;

class RSS
{
    /**
     * @var Channel
     */
    private $channel;

    /**
     * @var Array
     */
    private $tweets;

    /**
     * @return Channel
     */
    public function getChannel()
    {
        return $this->channel;
    }

    /**
     * @param Channel $channel
     * @return RSS
     */
    public function setChannel($channel)
    {
        $this->channel = $channel;
        return $this;
    }

    /**
     * @return Array
     */
    public function getTweets()
    {
        return $this->tweets;
    }

    /**
     * @param Array $tweets
     * @return RSS
     */
    public function setTweets(Array $tweets)
    {
        $this->tweets = $tweets;
        return $this;
    }

    public function addTweet(Tweet $tweet)
    {
        $this->tweets[] = $tweet;
        return $this;
    }

    public function parseTimeline($timeline)
    {
        foreach ($timeline as $tweet) {
            $item = new Tweet();
            $item->setId($tweet->id)
                ->setTitle($tweet->text)
                ->setDescription($tweet->text)
                ->setPubDate($tweet->created_at)
                ->setPlace($tweet->place)
                ->setUsername($tweet->user->screen_name)
                ->setUserId($tweet->user->id)
            ;
            $this->addTweet($item);
        }
    }

    /**
     * @return string
     */
    public function toXML()
    {
        $xml  = '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL;
        $xml .= '<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:georss="http://www.georss.org/georss" xmlns:twitter="http://api.twitter.com" version="2.0">'  . PHP_EOL;
        $xml .=     "\t<channel>" . PHP_EOL;
        $xml .= $this->getChannel()
            ->toXML();

        foreach ($this->tweets as $tweet) {
            $xml .= "\t\t<item>" . PHP_EOL;
            $xml .= $tweet->toXML();
            $xml .= "\t\t</item>" . PHP_EOL;
        }
        $xml .=     "\t</channel>" . PHP_EOL;
        $xml .= '</rss>';

        return $xml;
    }
}

{'fraction_non_alphanumeric': 0.1671797300497277, 'fraction_numerical': 0.004735969689793985, 'mean_word_length': 1.5172824791418356, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 2, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 28}, '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': '4379640', 'n_tokens_mistral': 1433, 'n_tokens_neox': 1386, 'n_words': 248}