<commit_before><?php

namespace BD\Subber\ReleaseSubtitles;

use BD\Subber\Release\Release;
use BD\Subber\ReleaseSubtitles\TestedReleaseSubtitle;

class CompatibilityMatcher
{
    /**
     * Matches $subtitles against Episode Release $release
     *
     * @param \BD\Subber\Release\Release $release
     * @param \BD\Subber\Subtitles\Subtitle[] $testedSubtitles
     *
     * @return \BD\Subber\ReleaseSubtitles\TestedReleaseSubtitle[]
     */
    public function match( Release $release, array $testedSubtitles )
    {
        $testedSubtitles = $this->makeSubtitlesTestable( $release, $testedSubtitles );

        $releaseRequiresRepackedSubtitles = $this->releaseRequiresRepackedSubtitles( $release, $testedSubtitles );

        foreach ( $testedSubtitles as $subtitle ) {
            if ( $releaseRequiresRepackedSubtitles )
            {
                if ( $subtitle->isProper !== $release->isProper || $subtitle->isRepack !== $release->isRepack ) {
                    $subtitle->setIncompatible();
                }
            }
<commit_msg>Fixed error in compat matcher<commit_after><?php

namespace BD\Subber\ReleaseSubtitles;

use BD\Subber\Release\Release;
use BD\Subber\ReleaseSubtitles\TestedReleaseSubtitle;

class CompatibilityMatcher
{
    /**
     * Matches $subtitles against Episode Release $release
     *
     * @param \BD\Subber\Release\Release $release
     * @param \BD\Subber\Subtitles\Subtitle[] $testedSubtitles
     *
     * @return \BD\Subber\ReleaseSubtitles\TestedReleaseSubtitle[]
     */
    public function match( Release $release, array $testedSubtitles )
    {
        if ( !count( $testedSubtitles ) ) {
            return array;
        }
        $testedSubtitles = $this->makeSubtitlesTestable( $release, $testedSubtitles );

        $releaseRequiresRepackedSubtitles = $this->releaseRequiresRepackedSubtitles( $release, $testedSubtitles );

        foreach ( $testedSubtitles as $subtitle ) {
            if ( $releaseRequiresRepackedSubtitles )
            {
                if ( $subtitle->isProper !== $release->isProper || $subtitle->isRepack !== $release->isRepack ) {
                    $subtitle->setIncompatible();
                }
            }

{'fraction_non_alphanumeric': 0.11227272727272727, 'fraction_numerical': 0.0, 'mean_word_length': 2.749574105621806, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4906722', 'n_tokens_mistral': 682, 'n_tokens_neox': 654, 'n_words': 109}