<commit_before><?php namespace Flarum\Core\Models;

abstract class ActivityPost extends Post implements MergeableInterface
{
    use MergeableTrait;

    /**
     * Unserialize the content attribute.
     *
     * @param  string  $value
     * @return string
     */
    public function getContentAttribute($value)
    {
        return json_decode($value);
    }

    /**
     * Serialize the content attribute.
     *
     * @param  string  $value
     */
    public function setContentAttribute($value)<commit_msg>Fix content attribute decoding into an object<commit_after><?php namespace Flarum\Core\Models;

abstract class ActivityPost extends Post implements MergeableInterface
{
    use MergeableTrait;

    /**
     * Unserialize the content attribute.
     *
     * @param  string  $value
     * @return string
     */
    public function getContentAttribute($value)
    {
        return json_decode($value, true);
    }

    /**
     * Serialize the content attribute.
     *
     * @param  string  $value
     */
    public function setContentAttribute($value)
{'fraction_non_alphanumeric': 0.08691588785046729, 'fraction_numerical': 0.0, 'mean_word_length': 2.5939597315436242, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1861373', 'n_tokens_mistral': 292, 'n_tokens_neox': 285, 'n_words': 78}