From 2b419bd47194411a9eb32efa5c7d0c94d2e1adf7 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 8 Feb 2024 03:10:58 -0500 Subject: [PATCH 1/2] patch typo --- phpstan-baseline.neon | 5 +++++ src/ManagedDatabases.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 51e9464..1000d04 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -5,6 +5,11 @@ parameters: count: 1 path: src/ManagedDatabases.php + - + message: "#^Call to an undefined static method Illuminate\\\\Support\\\\Facades\\\\Schema\\:\\:databaseExists\\(\\)\\.$#" + count: 1 + path: src/ManagedDatabases.php + - message: "#^Call to an undefined method Pest\\\\PendingCalls\\\\TestCall\\:\\:expect\\(\\)\\.$#" count: 1 diff --git a/src/ManagedDatabases.php b/src/ManagedDatabases.php index 432b6dc..d1f3949 100755 --- a/src/ManagedDatabases.php +++ b/src/ManagedDatabases.php @@ -97,7 +97,7 @@ public static function createDatabase($database, $managerConnection = 'manager_s throw new UnsupportedDriver('The driver '.$driver.' is not supported by the '.$macro.' macro'); } - if(Schema::databaseExist(static::makeDatabaseName($database, $managerConnection, $disk))) { + if(Schema::databaseExists(static::makeDatabaseName($database, $managerConnection, $disk))) { $database = (string) $database.'_1'; static::createDatabase($database, $managerConnection, $disk); } From 681b302bfcfbfad17bb8fb04211f4a0975adb4c0 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 8 Feb 2024 03:11:24 -0500 Subject: [PATCH 2/2] format code --- src/ManagedDatabases.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ManagedDatabases.php b/src/ManagedDatabases.php index d1f3949..d7fe292 100755 --- a/src/ManagedDatabases.php +++ b/src/ManagedDatabases.php @@ -97,7 +97,7 @@ public static function createDatabase($database, $managerConnection = 'manager_s throw new UnsupportedDriver('The driver '.$driver.' is not supported by the '.$macro.' macro'); } - if(Schema::databaseExists(static::makeDatabaseName($database, $managerConnection, $disk))) { + if (Schema::databaseExists(static::makeDatabaseName($database, $managerConnection, $disk))) { $database = (string) $database.'_1'; static::createDatabase($database, $managerConnection, $disk); }