1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 20:14:04 +00:00

simplify if condition

This commit is contained in:
Abrar Ahmad 2022-09-23 11:47:38 +05:00
parent 9c9a3d09fc
commit 9ea05394e2

View file

@ -53,11 +53,9 @@ class SQLiteDatabaseManager implements TenantDatabaseManager
public function getPath(string $name): string public function getPath(string $name): string
{ {
if (static::$path) { if (static::$path) {
// The path is set, so return the full path with the database name return static::$path . DIRECTORY_SEPARATOR . $name;
return str(static::$path)->append(DIRECTORY_SEPARATOR)->append($name)->toString();
} }
// The path is not set so return the default path
return database_path($name); return database_path($name);
} }
} }