<commit_before><?php
/**
 * Model for EtablissementLiaisonsOperateurs
 *
 */

class EtablissementLiaisonsOperateurs extends BaseEtablissementLiaisonsOperateurs {

    public function getChai(){
        // if(!$this->aliases->exist('chai') || !$this->aliases->chai){
        //     return null;
        // }
        // $etblie = EtablissementClient::getInstance()->find($this->id_etablissement);
        // $chaiNom = $this->aliases->chai;
        // foreach ($etblie->getChais() as $c) {
        //     if($c->nom == $chaiNom){
        //         return $c;
        //     }
        // }
        if($this->hash_chai && $this->id_etablissement){
            $etblie = EtablissementClient::getInstance()->find($this->id_etablissement);
            $chaihash = $this->hash_chai;
            if($etblie && $etblie->$chaihash){
                return $etblie->$chaihash;
            }
        }

        return null;
    }
}
<commit_msg>nettoyage de code<commit_after><?php
/**
 * Model for EtablissementLiaisonsOperateurs
 *
 */

class EtablissementLiaisonsOperateurs extends BaseEtablissementLiaisonsOperateurs {

    public function getChai(){
        if($this->hash_chai && $this->id_etablissement){
            $etblie = EtablissementClient::getInstance()->find($this->id_etablissement);
            $chaihash = $this->hash_chai;
            if($etblie && $etblie->$chaihash){
                return $etblie->$chaihash;
            }
        }

        return null;
    }
}

{'fraction_non_alphanumeric': 0.14993215739484397, 'fraction_numerical': 0.0, 'mean_word_length': 2.1995661605206074, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '5017890', 'n_tokens_mistral': 481, 'n_tokens_neox': 478, 'n_words': 64}