private function assessOptions(array $options): void
    {
        $defaultOptions = [
            'rest_server' => self::REST_SERVER,
            'auth_url' => self::AUTHENTICATION,
            'max_attempt' => self::DEFAULT_MAX_ATTEMPT,
            'default_headers' => [
                'Accept' => 'application/json',
            ],
        ];

        $this->options = new Collection(
            array_merge(
                $defaultOptions,
                $options
            )
        );

        if (isset($options['access_token'])) {
            $this->setAuthorizationHeader($options['access_token']);
        }

        if (isset($options['recycle_token']) && is_callable($options['recycle_token'])) {
            $this->recycleToken(
                $options['recycle_token']
            );
        }

        if (isset($options['token_saver']) && is_callable($options['token_saver'])) {
            $this->setTokenSaver(
                $options['token_saver']
            );
        }

        $this->httpClient = new Client([
            'base_uri' => $this->options->get('rest_server'),
        ]);
    }
private function assessOptions(array $options): void
    {
        $defaultOptions = [
            'rest_server' => self::REST_SERVER,
            'auth_url' => self::AUTHENTICATION,
            'max_attempt' => self::DEFAULT_MAX_ATTEMPT,
            'default_headers' => [
                'Accept' => 'application/json',
            ],
        ];

        $this->options = new Collection(
            array_merge(
                $defaultOptions,
                $options
            )
        );

        if (isset($options['access_token'])) {
            $this->setAuthorizationHeader($options['access_token']);
        }

        if (isset($options['recycle_token']) && is_callable($options['recycle_token'])) {
            $this->recycleToken(
                $options['recycle_token']
            );
        }

        if (isset($options['token_saver']) && is_callable($options['token_saver'])) {
            $this->setTokenSaver(
                $options['token_saver']
            );
        }

        $this->httpClient = new Client([
            'base_uri' => $this->options->get('rest_server'),
        ]);
    }
private function assessOptions ( array $ options ) : void { $ defaultOptions = [ 'rest_server' => self :: REST_SERVER , 'auth_url' => self :: AUTHENTICATION , 'max_attempt' => self :: DEFAULT_MAX_ATTEMPT , 'default_headers' => [ 'Accept' => 'application/json' , ] , ] ; $ this -> options = new Collection ( array_merge ( $ defaultOptions , $ options ) ) ; if ( isset ( $ options [ 'access_token' ] ) ) { $ this -> setAuthorizationHeader ( $ options [ 'access_token' ] ) ; } if ( isset ( $ options [ 'recycle_token' ] ) && is_callable ( $ options [ 'recycle_token' ] ) ) { $ this -> recycleToken ( $ options [ 'recycle_token' ] ) ; } if ( isset ( $ options [ 'token_saver' ] ) && is_callable ( $ options [ 'token_saver' ] ) ) { $ this -> setTokenSaver ( $ options [ 'token_saver' ] ) ; } $ this -> httpClient = new Client ( [ 'base_uri' => $ this -> options -> get ( 'rest_server' ) , ] ) ; }
assessing and custom option
assessing and custom option