This commit is contained in:
yansongda 2021-06-29 19:07:49 +08:00
parent 500fbdb2c5
commit e1b4498197
2 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,7 @@ class Pay
*/
public static function __callStatic(string $service, array $config)
{
if (!empty($config) && !self::hasContainer()) {
if (!empty($config)) {
self::config(...$config);
}
@ -108,7 +108,7 @@ class Pay
*/
public static function config(array $config = []): Pay
{
if (empty($config) && self::hasContainer()) {
if (self::hasContainer() && !($config['_force'] ?? false)) {
return self::get(Pay::class);
}

View File

@ -22,7 +22,7 @@ use Yansongda\Supports\Pipeline;
class PayTest extends TestCase
{
protected function tearDown (): void
protected function tearDown(): void
{
Pay::clear();
}