<commit_before><?php

/**
 * Object that represents a reported event comment
 */
class TalkCommentReportModel extends AbstractModel
{
    /**
     * Default fields in the output view
     *
     * format: [public facing name => database column]
     *
     * @return array
     */
    public function getDefaultFields()
    {
        $fields = array(
            'reporting_date'          => 'reporting_date',
            'decision'                => 'decision',
            'deciding_date'           => 'deciding_date',
            'reporting_user_username' => 'reporting_username',
            'deciding_user_username'  => 'deciding_username',
        );

        return $fields;
    }

    /**
     * Default fields in the output view
     *
     * format: [public facing name => database column]
     *
     * @return array
     */
    public function getVerboseFields()
    {
        $fields = $this->getDefaultFields();

        return $fields;
    }

    /**
     * List of subresource keys that may be in the data set from the mapper
     * but are not database columns that need to be in the output view
     *
     * format: [public facing name => field in $this->data]
     *
     * @return array
     */
    public function getSubResources()
    {
        return [
            'comment'   => 'comment',
        ];
    }

    /**
     * Return this object with client-facing fields and hypermedia, ready for output
     */
    public function getOutputView(Request $request, $verbose = false)
    {
        $item = parent::getOutputView($request, $verbose);
        
        // add Hypermedia
        $base    = $request->base;
        $version = $request->version;

        $item['reporting_user']       = $base . '/' . $version . '/users/' . $this->reporting_user_id;
        if (!empty($this->deciding_user_id)) {
            $item['deciding_user_uri']        = $base . '/' . $version . '/users/' . $this->deciding_user_id;
        }
        $item['event_uri']            = $base . '/' . $version . '/events/' . $this->event_id;
        $item['talk_uri']             = $base . '/' . $version . '/talks/' . $this->talk_id;

        return $item;
    }
}
<commit_msg>Set property name to reporting_user_uri<commit_after><?php

/**
 * Object that represents a reported event comment
 */
class TalkCommentReportModel extends AbstractModel
{
    /**
     * Default fields in the output view
     *
     * format: [public facing name => database column]
     *
     * @return array
     */
    public function getDefaultFields()
    {
        $fields = array(
            'reporting_date'          => 'reporting_date',
            'decision'                => 'decision',
            'deciding_date'           => 'deciding_date',
            'reporting_user_username' => 'reporting_username',
            'deciding_user_username'  => 'deciding_username',
        );

        return $fields;
    }

    /**
     * Default fields in the output view
     *
     * format: [public facing name => database column]
     *
     * @return array
     */
    public function getVerboseFields()
    {
        $fields = $this->getDefaultFields();

        return $fields;
    }

    /**
     * List of subresource keys that may be in the data set from the mapper
     * but are not database columns that need to be in the output view
     *
     * format: [public facing name => field in $this->data]
     *
     * @return array
     */
    public function getSubResources()
    {
        return [
            'comment'   => 'comment',
        ];
    }

    /**
     * Return this object with client-facing fields and hypermedia, ready for output
     */
    public function getOutputView(Request $request, $verbose = false)
    {
        $item = parent::getOutputView($request, $verbose);
        
        // add Hypermedia
        $base    = $request->base;
        $version = $request->version;

        $item['reporting_user_uri'] = $base . '/' . $version . '/users/' . $this->reporting_user_id;
        if (!empty($this->deciding_user_id)) {
            $item['deciding_user_uri']        = $base . '/' . $version . '/users/' . $this->deciding_user_id;
        }
        $item['event_uri']            = $base . '/' . $version . '/events/' . $this->event_id;
        $item['talk_uri']             = $base . '/' . $version . '/talks/' . $this->talk_id;

        return $item;
    }
}

{'fraction_non_alphanumeric': 0.12916476494751256, 'fraction_numerical': 0.0, 'mean_word_length': 1.836893203883495, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 39, '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': '3208509', 'n_tokens_mistral': 1254, 'n_tokens_neox': 1227, 'n_words': 316}