<commit_before><?php

declare(strict_types = 1);

namespace idOS;

use GuzzleHttp\Client;
use idOS\Auth\AuthInterface;
use idOS\Section\Profile;
use idOS\Section\Profile\Process;

class SDK {
    /**
     * Authentication instance.
     */
    private $authentication;
    /**
     * GuzzleHttp\Client.
     */
    private $client;
    /**
     * boolean option to throw exception.
     */
    private $throwsExceptions;

    /**
     * Creates the SDK instance.
     *
     * @param AuthInterface $authentication
     *
     * @return SDK instance
     */
    public static function create(AuthInterface $authentication, bool $throwsExceptions = false) {
        return new static(
            $authentication,
            new Client(),
            $throwsExceptions
        );
    }

    /**
     * Constructor Class.
     *
     * @param AuthInterface $authentication
     * @param Client        $client
     * @param bool|bool     $throwsExceptions
     */
    public function __construct(AuthInterface $authentication, Client $client, bool $throwsExceptions = false) {
        $this->authentication   = $authentication;
        $this->client           = $client;
        $this->throwsExceptions = $throwsExceptions;
    }

    /**
     * setter Stores auth object.
     *
     * @param AuthInterface $authentication
     */
    public function setAuth(AuthInterface $authentication) : self {
        $this->authentication = $authentication;

        return $this;
    }

    /**
     * Returns auth object.
     *
     * @return AuthInterface auth
     */
    public function getAuth() : AuthInterface {
        return $this->authentication;
    }

    /**
     * Setter sets GuzzleHttp\Client instance.
     *
     * @param Client $client
     */
    public function setClient(Client $client) : self {
        $this->client = $client;

        return $this;
    }

    /**
     * Returns the GuzzleHttp\Client instance.
     *
     * @return GuzzeHttp\Client client
     */
    public function getClient() : Client {
        return $this->client;
    }

    /**
     * Sets the throws exception option.
     *
     * @param bool $throws
     */
    public function setThrowsExceptions(bool $throws) : self {
        $this->throwsExceptions = $throws;

        return $this;
    }

    /**
     * Returns boolean value of $throwsExceptions.
     *
     * @return bool throwsExceptions
     */
    public function getThrowsExceptions() : bool {
        return $this->throwsExceptions;
    }

    /**
     * Return new instance of Section\Profile.
     *
     * @param string $userName
     *
     * @return Section\Profile instance
     */
    public function profile(string $userName) : Profile {
        return new Profile(
            $userName,
            $this->authentication,
            $this->client,
            $this->throwsExceptions
        );
    }

    /**
     * Return new instance of Company Endpoint.
     *
     * @param string $companySlug
     *
     * @return Endpoint\Company instance
     */
    public function company(string $companySlug) : Company {
        return new Endpoint\Company(
            $companySlug,
            $this->authentication,
            $this->client,
            $this->throwsExceptions
        );
    }

    /**
     * Return new instance of SSO Endpoint.
     *
     * @return Endpoint\SSO instance
     */
    public function sso() : SSO {
        return new Endpoint\SSO(
            $this->authentication,
            $this->client,
            $this->throwsExceptions
        );
    }

    /**
     * Return new instance of Section\Profile\Process.<commit_msg>SDK | Company section fix<commit_after><?php

declare(strict_types = 1);

namespace idOS;

use GuzzleHttp\Client;
use idOS\Auth\AuthInterface;
use idOS\Section\Company;
use idOS\Section\Profile;
use idOS\Section\Profile\Process;

class SDK {
    /**
     * Authentication instance.
     */
    private $authentication;
    /**
     * GuzzleHttp\Client.
     */
    private $client;
    /**
     * boolean option to throw exception.
     */
    private $throwsExceptions;

    /**
     * Creates the SDK instance.
     *
     * @param AuthInterface $authentication
     *
     * @return SDK instance
     */
    public static function create(AuthInterface $authentication, bool $throwsExceptions = false) {
        return new static(
            $authentication,
            new Client(),
            $throwsExceptions
        );
    }

    /**
     * Constructor Class.
     *
     * @param AuthInterface $authentication
     * @param Client        $client
     * @param bool|bool     $throwsExceptions
     */
    public function __construct(AuthInterface $authentication, Client $client, bool $throwsExceptions = false) {
        $this->authentication   = $authentication;
        $this->client           = $client;
        $this->throwsExceptions = $throwsExceptions;
    }

    /**
     * setter Stores auth object.
     *
     * @param AuthInterface $authentication
     */
    public function setAuth(AuthInterface $authentication) : self {
        $this->authentication = $authentication;

        return $this;
    }

    /**
     * Returns auth object.
     *
     * @return AuthInterface auth
     */
    public function getAuth() : AuthInterface {
        return $this->authentication;
    }

    /**
     * Setter sets GuzzleHttp\Client instance.
     *
     * @param Client $client
     */
    public function setClient(Client $client) : self {
        $this->client = $client;

        return $this;
    }

    /**
     * Returns the GuzzleHttp\Client instance.
     *
     * @return GuzzeHttp\Client client
     */
    public function getClient() : Client {
        return $this->client;
    }

    /**
     * Sets the throws exception option.
     *
     * @param bool $throws
     */
    public function setThrowsExceptions(bool $throws) : self {
        $this->throwsExceptions = $throws;

        return $this;
    }

    /**
     * Returns boolean value of $throwsExceptions.
     *
     * @return bool throwsExceptions
     */
    public function getThrowsExceptions() : bool {
        return $this->throwsExceptions;
    }

    /**
     * Return new instance of Section\Profile.
     *
     * @param string $userName
     *
     * @return Section\Profile instance
     */
    public function profile(string $userName) : Profile {
        return new Profile(
            $userName,
            $this->authentication,
            $this->client,
            $this->throwsExceptions
        );
    }

    /**
     * Return new instance of Company Endpoint.
     *
     * @param string $companySlug
     *
     * @return Endpoint\Company instance
     */
    public function company(string $companySlug) : Company {
        return new Company(
            $companySlug,
            $this->authentication,
            $this->client,
            $this->throwsExceptions
        );
    }

    /**
     * Return new instance of SSO Endpoint.
     *
     * @return Endpoint\SSO instance
     */
    public function sso() : SSO {
        return new Endpoint\SSO(
            $this->authentication,
            $this->client,
            $this->throwsExceptions
        );
    }

    /**
     * Return new instance of Section\Profile\Process.
{'fraction_non_alphanumeric': 0.1043298969072165, 'fraction_numerical': 0.000274914089347079, 'mean_word_length': 1.8690851735015772, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 39, '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': '5064495', 'n_tokens_mistral': 2025, 'n_tokens_neox': 1975, 'n_words': 482}