Code Duplication    Length = 8-10 lines in 2 locations

src/Gateways/Alipay/Support.php 1 location

@@ 90-97 (lines=8) @@
87
     *
88
     * @return Support
89
     */
90
    public static function create(Config $config)
91
    {
92
        if (php_sapi_name() === 'cli' || !(self::$instance instanceof self)) {
93
            self::$instance = new self($config);
94
        }
95
96
        return self::$instance;
97
    }
98
99
    /**
100
     * clear.

src/Gateways/Wechat/Support.php 1 location

@@ 103-112 (lines=10) @@
100
     *
101
     * @return Support
102
     */
103
    public static function create(Config $config)
104
    {
105
        if (php_sapi_name() === 'cli' || !(self::$instance instanceof self)) {
106
            self::$instance = new self($config);
107
108
            self::setDevKey();
109
        }
110
111
        return self::$instance;
112
    }
113
114
    /**
115
     * getInstance.