<commit_before><?php

  class Group extends BaseModel{

    public $id, $name, $description, $members;

    public function __construct($attributes){
      parent::__construct($attributes);
      $this->validators = array('validate_name', 'validate_description');
    }

    public static function all(){
      $query = 'SELECT * FROM Eventgroup';
      $rows = parent::multi_row_query($query, array());
      $groups = array();

      foreach($rows as $row){
        $groups[] = parent::parse_group_from_query($row);
      }

      return $groups;
    }

    public static function find($id){
      $query = 'SELECT * FROM Eventgroup WHERE id = :id LIMIT 1';
      $parameters = array(':id' => $id);
      $row = parent::single_row_query($query, $parameters);

      if($row){
        return parent::parse_group_from_query($row);
      }

      return null;
    }

    public static function find_by_name($name){
      $query = 'SELECT * FROM Eventgroup WHERE name = :name';
      $parameters = array(':name' => $name);<commit_msg>ryhmäsivun ryhmät järjestetään aakkosjärjestyksen mukaan<commit_after><?php

  class Group extends BaseModel{

    public $id, $name, $description, $members;

    public function __construct($attributes){
      parent::__construct($attributes);
      $this->validators = array('validate_name', 'validate_description');
    }

    public static function all(){
      $query = 'SELECT * FROM Eventgroup ORDER BY name';
      $rows = parent::multi_row_query($query, array());
      $groups = array();

      foreach($rows as $row){
        $groups[] = parent::parse_group_from_query($row);
      }

      return $groups;
    }

    public static function find($id){
      $query = 'SELECT * FROM Eventgroup WHERE id = :id LIMIT 1';
      $parameters = array(':id' => $id);
      $row = parent::single_row_query($query, $parameters);

      if($row){
        return parent::parse_group_from_query($row);
      }

      return null;
    }

    public static function find_by_name($name){
      $query = 'SELECT * FROM Eventgroup WHERE name = :name';
      $parameters = array(':name' => $name);
{'fraction_non_alphanumeric': 0.14144271570014144, 'fraction_numerical': 0.000942951438000943, 'mean_word_length': 3.1284046692607004, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '877331', 'n_tokens_mistral': 633, 'n_tokens_neox': 610, 'n_words': 156}