<commit_before><?php

/*
 * This file is part of the ripple library.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace jamband\ripple;

use stdClass;
use Goutte\Client;
use Symfony\Component\DomCrawler\Crawler;

/**
 * Ripple class file.
 */
class Ripple
{
    /**
     * @var array all providers (provider => class)
     */
    public static $providers = [
        'Bandcamp' => __NAMESPACE__.'\Bandcamp',
        'SoundCloud' => __NAMESPACE__.'\SoundCloud',
        'Vimeo' => __NAMESPACE__.'\Vimeo',
        'YouTube' => __NAMESPACE__.'\YouTube',
    ];

    /**
     * @var string URL of the provider
     */
    public $url;

    /**
     * @var string the provider name
     */
    public $provider;

    /**
     * @var stdClass|Crawler contents of the track
     */
    public $content;

    private $embedParams;

    /**
     * @param string $url
     */
    public function __construct($url = null)
    {
        $this->url = $url;

        $domain = function ($url) {
            return implode('.', array_slice(
                explode('.', parse_url($url, PHP_URL_HOST)), -2
            ));
        };
        foreach (static::$providers as $provider => $class) {
            if ($domain($url) === $class::$host) {
                $this->provider = $provider;
                break;
            }
        }
    }

    /**
     * @param string $method
     * @param array $args
     * @return string|null
     */
    public function __call($method, array $args = [])
    {<commit_msg>Change public to private in Ripple::$providers<commit_after><?php

/*
 * This file is part of the ripple library.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace jamband\ripple;

use stdClass;
use Goutte\Client;
use Symfony\Component\DomCrawler\Crawler;

/**
 * Ripple class file.
 */
class Ripple
{
    /**
     * @var string URL of the provider
     */
    public $url;

    /**
     * @var string the provider name
     */
    public $provider;

    /**
     * @var stdClass|Crawler contents of the track
     */
    public $content;

    private static $providers = [
        'Bandcamp' => __NAMESPACE__.'\Bandcamp',
        'SoundCloud' => __NAMESPACE__.'\SoundCloud',
        'Vimeo' => __NAMESPACE__.'\Vimeo',
        'YouTube' => __NAMESPACE__.'\YouTube',
    ];

    private $embedParams;

    /**
     * @param string $url
     */
    public function __construct($url = null)
    {
        $this->url = $url;

        $domain = function ($url) {
            return implode('.', array_slice(
                explode('.', parse_url($url, PHP_URL_HOST)), -2
            ));
        };
        foreach (static::$providers as $provider => $class) {
            if ($domain($url) === $class::$host) {
                $this->provider = $provider;
                break;
            }
        }
    }

    /**
     * @param string $method
     * @param array $args
     * @return string|null
     */
    public function __call($method, array $args = [])
    {
{'fraction_non_alphanumeric': 0.14107365792759052, 'fraction_numerical': 0.0006242197253433209, 'mean_word_length': 1.9730983302411873, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 24, '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': '2049538', 'n_tokens_mistral': 990, 'n_tokens_neox': 977, 'n_words': 257}