<commit_before><?php

namespace RocketCode\Shopify;

/**
 * This trait should be used to implement the interface ShopifyApiUser
 */
trait UsesShopifyApi {
    /**
     * Get the Shopify API object to query Shopify
     *
     * @return \RocketCode\Shopify\API
     */
    public function getShopifyApi() {
        static $api;
        if (!($api instanceof API)) {
            $api = new API([
                'API_KEY' => env('SHOPIFY_APP_ID'),
                'API_SECRET' => env('SHOPIFY_APP_SECRET'),
                'SHOP_DOMAIN' => $this->getDomain(),
                'ACCESS_TOKEN' => $this->getAccessToken(),
            ]);
        }
        return $api;
    }<commit_msg>Fix to getShopifyApi() so it correctly returns different instances when dealing with different shops<commit_after><?php

namespace RocketCode\Shopify;

/**
 * This trait should be used to implement the interface ShopifyApiUser
 */
trait UsesShopifyApi {
    protected $api;

    /**
     * Get the Shopify API object to query Shopify
     *
     * @return \RocketCode\Shopify\API
     */
    public function getShopifyApi() {
        if (!($this->api instanceof API)) {
            $this->api = new API([
                'API_KEY' => env('SHOPIFY_APP_ID'),
                'API_SECRET' => env('SHOPIFY_APP_SECRET'),
                'SHOP_DOMAIN' => $this->getDomain(),
                'ACCESS_TOKEN' => $this->getAccessToken(),
            ]);
        }
        return $this->api;
    }
{'fraction_non_alphanumeric': 0.12406271301976823, 'fraction_numerical': 0.0, 'mean_word_length': 2.0840336134453783, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, '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': '2354513', 'n_tokens_mistral': 439, 'n_tokens_neox': 434, 'n_words': 107}