<commit_before><?php

/**
 * Class DebtGroupMember
 *
 * @property int $id
 * @property int $group
 * @property int $user
 * @property int $permissions
 * @property string $createDate
 */
class DebtGroupMember extends DbRecord {
    const PERMISSION_INVITE = 1;
    const PERMISSION_KICK = 2;
    const PERMISSION_OP = 4;

    public function tableName()
    {
        return "DebtGroupMembers";
    }

    public function givePermissions($permission)
    {
        $this->permissions |= $permission;
    }

    /**
     * @param $permission
     * @return bool
     */
    public function hasPermission($permission)
    {
        return !!($this->permissions & $permission);
    }

    /**
     * @param string $className
     * @return DebtGroupMember
     */
    public static function model($className = __CLASS__)<commit_msg>Added method removePermissions<commit_after><?php

/**
 * Class DebtGroupMember
 *
 * @property int $id
 * @property int $group
 * @property int $user
 * @property int $permissions
 * @property string $createDate
 */
class DebtGroupMember extends DbRecord {
    const PERMISSION_INVITE = 1;
    const PERMISSION_KICK = 2;
    const PERMISSION_OP = 4;

    public function tableName()
    {
        return "DebtGroupMembers";
    }

    public static function findByGroup($group)
    {
        return DebtGroupMember::model()->find("group = ?", $group);
    }

    public function givePermissions($permission)
    {
        $this->permissions |= $permission;
    }

    public function removePermissions($permission)
    {
        $this->permissions &= ~$permission;
    }
    /**
     * @param $permission
     * @return bool
     */
    public function hasPermission($permission)
    {
        return !!($this->permissions & $permission);
    }

    /**
     * @param string $className
     * @return DebtGroupMember
     */
    public static function model($className = __CLASS__)
{'fraction_non_alphanumeric': 0.11349372384937238, 'fraction_numerical': 0.0031380753138075313, 'mean_word_length': 2.7145631067961165, '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': '4016837', 'n_tokens_mistral': 558, 'n_tokens_neox': 537, 'n_words': 135}