<commit_before><?php namespace Onyx\Halo5\Objects;

use Illuminate\Database\Eloquent\Model;

/**
 * Class Medal
 * @package Onyx\Halo5\Objects
 * @property int $id
 * @property string $contentId
 * @property string $name
 * @property string $description
 * @property string classification
 * @property int $difficulty
 */
class Medal extends Model {

    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'halo5_medals';

    /**
     * The attributes that are not mass assignable.
     *
     * @var array
     */
    protected $guarded = ['id'];

    /**
     * Disable timestamps
     *
     * @var bool
     */
    public $timestamps = false;

    public static function boot()
    {
        parent::boot();
    }

    //---------------------------------------------------------------------------------
    // Accessors & Mutators
    //---------------------------------------------------------------------------------

    public function setDifficultyAttribute($value)
    {
        $this->attributes['difficulty'] = intval($value);
    }

    //---------------------------------------------------------------------------------
    // Public Methods
    //---------------------------------------------------------------------------------

    public static function getAll()
    {
        return \Cache::remember('medals-metadata', 120, function()
        {
            $items = [];

            foreach (Medal::orderBy('difficulty ASC')->get() as $medal)
            {
                $items[$medal->contentId] = $medal;
            }

            return $items;
        });
    }
}<commit_msg>ASC is by default<commit_after><?php namespace Onyx\Halo5\Objects;

use Illuminate\Database\Eloquent\Model;

/**
 * Class Medal
 * @package Onyx\Halo5\Objects
 * @property int $id
 * @property string $contentId
 * @property string $name
 * @property string $description
 * @property string classification
 * @property int $difficulty
 */
class Medal extends Model {

    /**
     * The database table used by the model.
     *
     * @var string
     */
    protected $table = 'halo5_medals';

    /**
     * The attributes that are not mass assignable.
     *
     * @var array
     */
    protected $guarded = ['id'];

    /**
     * Disable timestamps
     *
     * @var bool
     */
    public $timestamps = false;

    public static function boot()
    {
        parent::boot();
    }

    //---------------------------------------------------------------------------------
    // Accessors & Mutators
    //---------------------------------------------------------------------------------

    public function setDifficultyAttribute($value)
    {
        $this->attributes['difficulty'] = intval($value);
    }

    //---------------------------------------------------------------------------------
    // Public Methods
    //---------------------------------------------------------------------------------

    public static function getAll()
    {
        return \Cache::remember('medals-metadata', 120, function()
        {
            $items = [];

            foreach (Medal::orderBy('difficulty')->get() as $medal)
            {
                $items[$medal->contentId] = $medal;
            }

            return $items;
        });
    }
}
{'fraction_non_alphanumeric': 0.30054315027157513, 'fraction_numerical': 0.003621001810500905, 'mean_word_length': 1.112810707456979, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '747082', 'n_tokens_mistral': 824, 'n_tokens_neox': 785, 'n_words': 190}