/**
  * Creates or returns an instance of this class.
  *
  * @since  0.1.0
  * @return WDS_REST_Connect_UI A single instance of this class.
  */
 public static function get_instance()
 {
     if (null === self::$single_instance) {
         self::$single_instance = new self();
     }
     return self::$single_instance;
 }
<?php

/**
 * WDS WP REST API Connect UI Compatibility
 * @version 0.1.0
 * @package WDS WP REST API Connect UI
 */
WDS_REST_Connect_UI::include_file('vendor/wds-wp-rest-api-connect/wds-wp-rest-api-connect');
class WDSRESTCUI_Compatibility extends WDS_WP_REST_API_Connect
{
    /**
     * Whether plugin should operate on the network settings level.
     *
     * @var bool
     * @since  0.1.0
     */
    protected $is_network = false;
    /**
     * Object constructor
     *
     * @since 0.1.0
     *
     * @param boolean $is_network
     */
    public function __construct($is_network = false)
    {
        $this->is_network = (bool) $is_network;
        if ($this->is_network) {
            add_filter('pre_option_wp_rest_api_connect_error', array($this, 'override_error_option_get'), 10, 2);
        }
    }