Code Duplication    Length = 12-12 lines in 2 locations

src/Gateways/Alipay/Support.php 1 location

@@ 285-296 (lines=12) @@
282
     *
283
     * @return mixed|null
284
     */
285
    public function getConfig($key = null, $default = null)
286
    {
287
        if (is_null($key)) {
288
            return $this->config->all();
289
        }
290
291
        if ($this->config->has($key)) {
292
            return $this->config[$key];
293
        }
294
295
        return $default;
296
    }
297
298
    /**
299
     * Get Base Uri.

src/Gateways/Wechat/Support.php 1 location

@@ 375-386 (lines=12) @@
372
     *
373
     * @return mixed|null
374
     */
375
    public function getConfig($key = null, $default = null)
376
    {
377
        if (is_null($key)) {
378
            return $this->config->all();
379
        }
380
381
        if ($this->config->has($key)) {
382
            return $this->config[$key];
383
        }
384
385
        return $default;
386
    }
387
388
    /**
389
     * Get app id according to param type.