<commit_before><?php

class  AthleticCalendar implements CalendarInterface {
    protected $events = array();

    public function addEvent(AthleticEvent $event) {
        $this->events[] = $event;
    }

    /* CalendarInterface */
    public function add_event(CalendarEvent $event) {
        $athleticEvent = new AthleticEvent();
        $athleticEvent->setID($event->getID());

        $athleticEvent->setTitle($event->get_summary());
        $athleticEvent->setDescription($event->get_description());
        $athleticEvent->setLocation($event->get_location());
        $athleticEvent->setStartDate(new DateTime("@" . $event->get_start()));
        
        $this->addEvent($athleticEvent);
    }

    public function set_attribute($contentname, $value, $params) {
        // no op
    }
  
    public function getEvents() {
        return $this->events;
    }
  
    public function getEventsInRange(TimeRange $range=null, $limit=null, $filters=null) {
        
        $events = array();
        foreach ($this->events as $event) {
        $filters = is_array($filters) ? $filters : array();

        foreach ($this->events as $event) {
                    
            if ($event->filterItem($filters) && $range->overlaps($event->getRange())) {
                $events[] = $event;
            }
        }

        uasort($events, array($this, "sort_events"));
        
        // in some case, it doesn't work properly if we just sort $this->eventStartTimes
        return $events;<commit_msg>fixed set_attribute interface<commit_after><?php

class  AthleticCalendar implements CalendarInterface {
    protected $events = array();

    public function addEvent(AthleticEvent $event) {
        $this->events[] = $event;
    }

    /* CalendarInterface */
    public function add_event(CalendarEvent $event) {
        $athleticEvent = new AthleticEvent();
        $athleticEvent->setID($event->getID());

        $athleticEvent->setTitle($event->get_summary());
        $athleticEvent->setDescription($event->get_description());
        $athleticEvent->setLocation($event->get_location());
        $athleticEvent->setStartDate(new DateTime("@" . $event->get_start()));
        
        $this->addEvent($athleticEvent);
    }

    public function set_attribute($contentname, $value, $params=null) {
        // no op
    }
  
    public function getEvents() {
        return $this->events;
    }
  
    public function getEventsInRange(TimeRange $range=null, $limit=null, $filters=null) {
        
        $events = array();
        foreach ($this->events as $event) {
        $filters = is_array($filters) ? $filters : array();

        foreach ($this->events as $event) {
                    
            if ($event->filterItem($filters) && $range->overlaps($event->getRange())) {
                $events[] = $event;
            }
        }

        uasort($events, array($this, "sort_events"));
        
        // in some case, it doesn't work properly if we just sort $this->eventStartTimes
        return $events;
{'fraction_non_alphanumeric': 0.14257360238174, 'fraction_numerical': 0.0, 'mean_word_length': 2.520372526193248, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3811498', 'n_tokens_mistral': 859, 'n_tokens_neox': 835, 'n_words': 169}