<commit_before><?php
namespace Hypem;

class Track
{
    /**
    * @var string  $mediaid          Track ID
    * @var string  $artist           Artist name
    * @var string  $title            Track title
    * @var int     $dateposted       Unix timestamp (in seconds)
    * @var int     $siteid           ID of site which posted the track last
    * @var string  $sitename         Name of site which posted the track last
    * @var string  $posturl          Remote site post URL
    * @var int     $postid           Post ID
    * @var int     $loved_count      Favorites counter
    * @var int     $posted_count     Number of sites which posted the track
    * @var string  $thumb_url        Small post image
    * @var string  $thumb_url_medium Medium post image
    * @var string  $thumb_url_large  Large post image
    * @var string  $thumb_url_artist Artist image
    * @var int     $time             Track length in seconds
    * @var string  $description      Track description from remote site
    * @var array   $tags             Track tags
    * @var string  $itunes_link      Itunes URL
    */
    public $mediaid;
    public $artist;
    public $title;
    public $dateposted;
    public $siteid;
    public $sitename;
    public $posturl;
    public $postid;
    public $loved_count;
    public $posted_count;
    public $thumb_url;
    public $thumb_url_medium;
    public $thumb_url_large;
    public $thumb_url_artist;
    public $time;
    public $description;
    public $tags;
    public $itunes_link;

    public function __construct($props = [])
    {
        if (is_string($props)) {
            $this->mediaid = $props;
            $props = $this->getProperties();
        }

        foreach ((array)$props as $k => $v) {
            if (property_exists($this, $k)) {
                $this->$k = $v;
            }
        }
    }

    private function getProperties()
    {
        $data = Playlist::track($this->mediaid)->getData(1);
        return array_shift($data);
    }
}<commit_msg>Track fix<commit_after><?php
namespace Hypem;

class Track
{
    /**
    * @var string  $mediaid          Track ID
    * @var string  $artist           Artist name
    * @var string  $title            Track title
    * @var int     $dateposted       Unix timestamp (in seconds)
    * @var int     $siteid           ID of site which posted the track last
    * @var string  $sitename         Name of site which posted the track last
    * @var string  $posturl          Remote site post URL
    * @var int     $postid           Post ID
    * @var int     $loved_count      Favorites counter
    * @var int     $posted_count     Number of sites which posted the track
    * @var string  $thumb_url        Small post image
    * @var string  $thumb_url_medium Medium post image
    * @var string  $thumb_url_large  Large post image
    * @var string  $thumb_url_artist Artist image
    * @var int     $time             Track length in seconds
    * @var string  $description      Track description from remote site
    * @var array   $tags             Track tags
    * @var string  $itunes_link      Itunes URL
    */
    public $mediaid;
    public $artist;
    public $title;
    public $dateposted;
    public $siteid;
    public $sitename;
    public $posturl;
    public $postid;
    public $loved_count;
    public $posted_count;
    public $thumb_url;
    public $thumb_url_medium;
    public $thumb_url_large;
    public $thumb_url_artist;
    public $time;
    public $description;
    public $tags;
    public $itunes_link;

    public function __construct($props = [])
    {
        if (is_string($props)) {
            $this->mediaid = $props;
            $props = $this->getProperties();
        }

        foreach ($props as $k => $v) {
            if (property_exists($this, $k)) {
                $this->$k = $v;
            }
        }
    }

    private function getProperties()
    {
        $data = Playlist::track($this->mediaid)->getData(1);
        return empty($data) ? [] : $data[0];
        //return array_shift($data);
    }
}
{'fraction_non_alphanumeric': 0.09276574803149606, 'fraction_numerical': 0.0007381889763779527, 'mean_word_length': 1.932900432900433, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '3995017', 'n_tokens_mistral': 1210, 'n_tokens_neox': 1190, 'n_words': 376}