<commit_before><?php
namespace App\Model\Entity;

use Cake\ORM\Entity;

/**
 * Conta Entity.
 */
class Conta extends Entity
{

    /**
     * Fields that can be mass assigned using newEntity() or patchEntity().
     *
     * @var array
     */
    protected $_accessible = [
        '*' => true,
        'id' => false,
    ];

    protected function _getDescricaoTipo(){
        switch ($this->_properties['tipo']) {
            case 'S':
                return 'Assinatura';
                break;
            case 'L':<commit_msg>Inclui campo lazy para recuperar a senha<commit_after><?php
namespace App\Model\Entity;

use Cake\ORM\Entity;

/**
 * Conta Entity.
 */
class Conta extends Entity
{

    protected static $_senhas;
    
    /**
     * Fields that can be mass assigned using newEntity() or patchEntity().
     *
     * @var array
     */
    protected $_accessible = [
        '*' => true,
        'id' => false,
    ];

    protected function _getSenha()
    {        
        if( !isset(Conta::$_senhas) ) {
            Conta::$_senhas = TableRegistry::get('Senhas');
        }

        $query = Conta::$_senhas->find();

        $query = $query->where([
                'conta_id' => $this->id ])
            ->order(['data_cadastro' => 'DESC']);

        return $query->first()->senha;
    }

    protected function _getDescricaoTipo(){
        switch ($this->_properties['tipo']) {
            case 'S':
                return 'Assinatura';
                break;
            case 'L':
{'fraction_non_alphanumeric': 0.14504324683965403, 'fraction_numerical': 0.0, 'mean_word_length': 1.8217636022514072, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3278355', 'n_tokens_mistral': 463, 'n_tokens_neox': 442, 'n_words': 105}