Code Duplication    Length = 12-12 lines in 2 locations

src/Gateways/Wechat/Support.php 1 location

@@ 342-353 (lines=12) @@
339
     *
340
     * @return mixed|null
341
     */
342
    public function getConfig($key = null, $default = null)
343
    {
344
        if (is_null($key)) {
345
            return $this->config->all();
346
        }
347
348
        if ($this->config->has($key)) {
349
            return $this->config[$key];
350
        }
351
352
        return $default;
353
    }
354
355
    /**
356
     * Get app id according to param type.

src/Gateways/Alipay/Support.php 1 location

@@ 298-309 (lines=12) @@
295
     *
296
     * @return mixed|null
297
     */
298
    public function getConfig($key = null, $default = null)
299
    {
300
        if (is_null($key)) {
301
            return $this->config->all();
302
        }
303
304
        if ($this->config->has($key)) {
305
            return $this->config[$key];
306
        }
307
308
        return $default;
309
    }
310
311
    /**
312
     * Get Base Uri.