<commit_before><?php

namespace Shopify;

use Shopify\Http\Client;
use Shopify\Exception;
use Shopify\Util;

class Shopify
{
    protected static $instance;
    protected $client;

    public static $api_key;
    public static $api_secret;
    public static $redirect_uri;
    public static $permissions;
    public static $store;
    public static $access_token;
    public static $strict = TRUE;

    public function __construct(Client $client)
    {
        $this->client = $client;
    }

    public static function init(array $opts = array())
    {
        $api = new static(new Client());
        static::setInstance($api);
        return $api;
    }

    public static function instance()
    {
        return static::$instance;
    }

    public static function setInstance(Shopify $instance)
    {
        static::$instance = $instance;
    }

    public function call($path, $method, array $params = array())
    {
        $request = $this->prepareRequest();
        $response = $request->execute();
    }

    public static function test($url)
    {
        return self::instance()->client->request('GET', $url);
    }

    public static function setOpt($key, $value = NULL)
    {
        if(is_array($key))
        {
            foreach($key as $k => $v)
            {
                self::setOpt($k, $v);
            }
        } else {
            if(!property_exists(__CLASS__, $key))
            {
                return;
            }
            self::$$key = $value;
        }
    }

    public static function __callStatic($method, $args)
    {
        error_log("requesting static method {$mehod}");
        if(property_exists(__CLASS__, $method))
        {
            return self::$$method;
        }<commit_msg>Debugging<commit_after><?php

namespace Shopify;

use Shopify\Http\Client;
use Shopify\Exception;
use Shopify\Util;

class Shopify
{
    protected static $instance;
    protected $client;

    public static $api_key;
    public static $api_secret;
    public static $redirect_uri;
    public static $permissions;
    public static $store;
    public static $access_token;
    public static $strict = TRUE;

    public function __construct(Client $client)
    {
        $this->client = $client;
    }

    public static function init(array $opts = array())
    {
        $api = new static(new Client());
        static::setInstance($api);
        return $api;
    }

    public static function instance()
    {
        return static::$instance;
    }

    public static function setInstance(Shopify $instance)
    {
        static::$instance = $instance;
    }

    public function call($path, $method, array $params = array())
    {
        $request = $this->prepareRequest();
        $response = $request->execute();
    }

    public static function test($url)
    {
        return self::instance()->client->request('GET', $url);
    }

    public static function setOpt($key, $value = NULL)
    {
        if(is_array($key))
        {
            foreach($key as $k => $v)
            {
                self::setOpt($k, $v);
            }
        } else {
            if(!property_exists(__CLASS__, $key))
            {
                return;
            }
            self::$$key = $value;
        }
    }

    public static function __callStatic($method, $args)
    {
        error_log("requesting static method {$method}");
        if(property_exists(__CLASS__, $method))
        {
            return self::$$method;
        }
{'fraction_non_alphanumeric': 0.12229593308335737, 'fraction_numerical': 0.0, 'mean_word_length': 2.044776119402985, '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': '569711', 'n_tokens_mistral': 980, 'n_tokens_neox': 962, 'n_words': 240}