<commit_before><?php

class BMAttackPower extends BMAttack {
    public $type = 'Power';

    public function find_attack($game) {
        $targets = $game->defenderAllDieArray;

        return $this->search_onevone($game, $this->validDice, $targets);
    }

    public function validate_attack($game, array $attackers, array $defenders) {
        if (1 != count($attackers) ||
            1 != count($defenders) ||
            $this->has_disabled_attackers($attackers)) {
            return FALSE;
        }

        if (!BMAttackPower::are_skills_compatible($attackers, $defenders)) {
            return FALSE;
        }

        $helpers = $this->collect_helpers($game, $attackers, $defenders);

        $bounds = $this->help_bounds($helpers);

        $att = $attackers[0];
        $def = $defenders[0];

        foreach ($att->attack_values($this->type) as $aVal) {
            $isValLargeEnough = $aVal + $bounds[1] >= $def->defense_value($this->type);
            $isValidAttacker = $att->is_valid_attacker($this->type, $attackers);
            $isValidTarget = $def->is_valid_target($this->type, $defenders);

            $isValidAttack = $isValLargeEnough && $isValidAttacker && $isValidTarget;

            if ($isValidAttack) {
                return TRUE;
            }
        }

        return FALSE;
    }

    /*
     * @inheritdoc
     */
    protected static function are_skills_compatible(array $attArray, array $defArray) {
        if (1 != count($attArray)) {
            throw new InvalidArgumentException('attArray must have one element.');
        }

        $att = $attArray[0];

        if (<commit_msg>Changed @inheritdoc to {@inheritDoc} to see if that works<commit_after><?php

class BMAttackPower extends BMAttack {
    public $type = 'Power';

    public function find_attack($game) {
        $targets = $game->defenderAllDieArray;

        return $this->search_onevone($game, $this->validDice, $targets);
    }

    public function validate_attack($game, array $attackers, array $defenders) {
        if (1 != count($attackers) ||
            1 != count($defenders) ||
            $this->has_disabled_attackers($attackers)) {
            return FALSE;
        }

        if (!BMAttackPower::are_skills_compatible($attackers, $defenders)) {
            return FALSE;
        }

        $helpers = $this->collect_helpers($game, $attackers, $defenders);

        $bounds = $this->help_bounds($helpers);

        $att = $attackers[0];
        $def = $defenders[0];

        foreach ($att->attack_values($this->type) as $aVal) {
            $isValLargeEnough = $aVal + $bounds[1] >= $def->defense_value($this->type);
            $isValidAttacker = $att->is_valid_attacker($this->type, $attackers);
            $isValidTarget = $def->is_valid_target($this->type, $defenders);

            $isValidAttack = $isValLargeEnough && $isValidAttacker && $isValidTarget;

            if ($isValidAttack) {
                return TRUE;
            }
        }

        return FALSE;
    }

    /*
     * {@inheritDoc}
     */
    protected static function are_skills_compatible(array $attArray, array $defArray) {
        if (1 != count($attArray)) {
            throw new InvalidArgumentException('attArray must have one element.');
        }

        $att = $attArray[0];

        if (
{'fraction_non_alphanumeric': 0.137409200968523, 'fraction_numerical': 0.00423728813559322, 'mean_word_length': 2.375893769152196, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '1527254', 'n_tokens_mistral': 1015, 'n_tokens_neox': 975, 'n_words': 192}