Code Duplication    Length = 12-12 lines in 2 locations

src/Gateways/Wechat/Support.php 1 location

@@ 353-364 (lines=12) @@
350
     *
351
     * @return mixed|null
352
     */
353
    public function getConfig($key = null, $default = null)
354
    {
355
        if (is_null($key)) {
356
            return $this->config->all();
357
        }
358
359
        if ($this->config->has($key)) {
360
            return $this->config[$key];
361
        }
362
363
        return $default;
364
    }
365
366
    /**
367
     * Get app id according to param type.

src/Gateways/Alipay/Support.php 1 location

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