<commit_before><?php

namespace Laratools\Eloquent;

use Illuminate\Database\Eloquent\Model;

class Meta extends Model
{
    protected $table = 'meta_information';

    protected $fillable = ['key', 'value', 'is_encrypted'];

    protected $casts = [
        'is_encrypted' => 'boolean',
    ];

    public function owner()
    {
        return $this->morphTo();
    }

    public function getValueAttribute($value)
    {
        if ($this->is_encrypted)
        {
            return app('encrypter')->decrypt($value);
        }

        return $value;
    }
}<commit_msg>Try {} catch {} when decrypting meta information<commit_after><?php

namespace Laratools\Eloquent;

use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Database\Eloquent\Model;

class Meta extends Model
{
    protected $table = 'meta_information';

    protected $fillable = ['key', 'value', 'is_encrypted'];

    protected $casts = [
        'is_encrypted' => 'boolean',
    ];

    public function owner()
    {
        return $this->morphTo();
    }

    public function getValueAttribute($value)
    {
        if ($this->is_encrypted)
        {
            try {
                $value = app('encrypter')->decrypt($value);
            } catch(DecryptException $e) {}
        }

        return $value;
    }
}
{'fraction_non_alphanumeric': 0.13143735588009223, 'fraction_numerical': 0.0, 'mean_word_length': 2.481283422459893, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6776161', 'n_tokens_mistral': 401, 'n_tokens_neox': 394, 'n_words': 80}