<commit_before><?php

/**
 * Class Element_OphInLabResults_ResultTimedNumeric.
 */
class Element_OphInLabResults_ResultTimedNumeric extends BaseLabResultElement
{
    protected $htmlOptions = array(
        'time' => array('type' => 'time'),
        'result' => array('type' => 'number'),
    );

    /**
     * @return string
     */
    public function tableName()
    {
        return 'et_ophinlabresults_result_timed_numeric';
    }

    /**
     * @return array validation rules for model attributes.
     */
    public function rules()
    {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        return array(
            array('time, result', 'required'),
            array('result', 'numerical'),
            array('time', 'type', 'type' => 'time', 'timeFormat' => 'hh:mm'),
            array('event_id, time, result, comment', 'safe'),
        );
    }

    /**
     * @return array relational rules.
     */
    public function relations()
    {
        // NOTE: you may need to adjust the relation name and the related
        // class name for the relations automatically generated below.
        return array(
            'event' => array(self::BELONGS_TO, 'Event', 'event_id'),
            'user' => array(self::BELONGS_TO, 'User', 'created_user_id'),
            'usermodified' => array(self::BELONGS_TO, 'User', 'last_modified_user_id'),
        );
    }

    /**
     * @return array customized attribute labels (name=>label)
     */
    public function attributeLabels()
    {
        return array(
            'id' => 'ID',
        );
    }

    /**
     * {@inheritdoc}
     */
    public function afterFind()
    {
        parent::afterFind();
        //We aren't really interested in the microseconds and it breaks the validation on edit
        $this->time = date_create_from_format('H:i:s', $this->time)->format('H:i');
    }
}<commit_msg>OE-6190: Changes label of time field<commit_after><?php

/**
 * Class Element_OphInLabResults_ResultTimedNumeric.
 */
class Element_OphInLabResults_ResultTimedNumeric extends BaseLabResultElement
{
    protected $htmlOptions = array(
        'time' => array('type' => 'time'),
        'result' => array('type' => 'number'),
    );

    /**
     * @return string
     */
    public function tableName()
    {
        return 'et_ophinlabresults_result_timed_numeric';
    }

    /**
     * @return array validation rules for model attributes.
     */
    public function rules()
    {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        return array(
            array('time, result', 'required'),
            array('result', 'numerical'),
            array('time', 'type', 'type' => 'time', 'timeFormat' => 'hh:mm'),
            array('event_id, time, result, comment', 'safe'),
        );
    }

    /**
     * @return array relational rules.
     */
    public function relations()
    {
        // NOTE: you may need to adjust the relation name and the related
        // class name for the relations automatically generated below.
        return array(
            'event' => array(self::BELONGS_TO, 'Event', 'event_id'),
            'user' => array(self::BELONGS_TO, 'User', 'created_user_id'),
            'usermodified' => array(self::BELONGS_TO, 'User', 'last_modified_user_id'),
        );
    }

    /**
     * @return array customized attribute labels (name=>label)
     */
    public function attributeLabels()
    {
        return array(
            'id' => 'ID',
            'time' => 'Time of Recording'
        );
    }

    /**
     * {@inheritdoc}
     */
    public function afterFind()
    {
        parent::afterFind();
        //We aren't really interested in the microseconds and it breaks the validation on edit
        $this->time = date_create_from_format('H:i:s', $this->time)->format('H:i');
    }
}
{'fraction_non_alphanumeric': 0.13735001276487108, 'fraction_numerical': 0.0010211896859841716, 'mean_word_length': 2.2541528239202657, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, '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': '7254125', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1110, 'n_words': 291}