<commit_before><?php

class Comment extends Eloquent
{

/**               **/
/** RELATIONSHIPS **/
/**               **/

    /**
     * The inverse relationship Blogpost has many Comment.
     *
     * @return BelongsTo
     */
    public function blogpost()
    {
        return $this->belongsTo('Blogpost');
    }

    /**
     * The inverse relationship User has many Comment.
     *
     * @return BelongsTo
     */
    public function user()
    {
        return $this->belongsTo('User');
    }

    /**
     * The inverse relationship Comment has many Comment.
     *
     * This relationship defines comment replies, and this function may
     * return null if the comment is not a reply.
     *
     * @return BelongsTo
     */
    public function parent()
    {
        return $this->belongsTo('Comment');
    }

    /**
     * The relationship Comment has many Comment.
     *
     * This relationship defines replies. This function may return null
     * if the comment has no replies.
     *
     * @return HasMany
     */
    public function children()
    {
        return $this->hasMany('Comment');
    }
}<commit_msg>Fix Comment<->Comment relationship foreign key<commit_after><?php

class Comment extends Eloquent
{

/**               **/
/** RELATIONSHIPS **/
/**               **/

    /**
     * The inverse relationship Blogpost has many Comment.
     *
     * @return BelongsTo
     */
    public function blogpost()
    {
        return $this->belongsTo('Blogpost');
    }

    /**
     * The inverse relationship User has many Comment.
     *
     * @return BelongsTo
     */
    public function user()
    {
        return $this->belongsTo('User');
    }

    /**
     * The inverse relationship Comment has many Comment.
     *
     * This relationship defines comment replies, and this function may
     * return null if the comment is not a reply.
     *
     * @return BelongsTo
     */
    public function parent()
    {
        return $this->belongsTo('Comment', 'parent_id');
    }

    /**
     * The relationship Comment has many Comment.
     *
     * This relationship defines replies. This function may return null
     * if the comment has no replies.
     *
     * @return HasMany
     */
    public function children()
    {
        return $this->hasMany('Comment', 'parent_id');
    }
}
{'fraction_non_alphanumeric': 0.10948905109489052, 'fraction_numerical': 0.0, 'mean_word_length': 1.8836633663366336, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 12, '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': '475492', 'n_tokens_mistral': 644, 'n_tokens_neox': 624, 'n_words': 194}